MeVisLab Toolbox Reference
SoView2DShaderBuiltInFunctions.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2015, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #pragma once
14 
15 #include <ShaderPipeline/ShaderPipeline.h>
16 #include <ShaderPipeline/ShaderPipelineFunction.h>
17 #include <ShaderPipeline/ShaderPipelineContext.h>
18 #include <ShaderPipeline/ShaderPipelineTargetContext.h>
19 
21 #include "SoView2DShaderState.h"
22 
24 
26 {
27 
28 #define SO_DECLARE_PIPELINE_FUNCTION_CLASS(className,baseClassName) \
29  class SOVIEW2D_API className: public baseClassName \
30  { \
31  public: \
32  className (): baseClassName() {}; \
33  protected: \
34  virtual void appendFunctionBody(std::stringstream& str, ShaderPipelineTargetContext& context) const; \
35  virtual void updateContext(ShaderPipelineContext& context) const; \
36 };
37 
38  class SOVIEW2D_API SoView2DShaderFunction : public ShaderPipelineFunction
39  {
40  public:
41  SoView2DShaderFunction(): ShaderPipelineFunction() { _state = nullptr; };
42 
43  void setState(const SoView2DShaderState* state) {
44  _state = state;
45  }
46 
47  protected:
49  };
50 
52  {
53  public:
55 
56  void setOverlay(const SoView2DShaderOverlayInfo* overlay) {
57  _overlay = overlay;
58  }
59 
60  void appendName(std::stringstream& str) const override;
61 
62  protected:
64  };
65 
73 }
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
void appendName(std::stringstream &str) const override
Stores information for each overlay to render.
Stores the state that defines the shader of the shader pipeline, used to detect if a regeneration of ...
SO_DECLARE_PIPELINE_FUNCTION_CLASS(SetupState, SoView2DShaderFunction)