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 using baseClassName::appendFunctionBody; \
35 virtual void appendFunctionBody(std::stringstream& str, ShaderPipelineTargetContext& context) const; \
36 virtual void updateContext(ShaderPipelineContext& context) const; \
37};
38
39 class SOVIEW2D_API SoView2DShaderFunction : public ShaderPipelineFunction
40 {
41 public:
42 SoView2DShaderFunction(): ShaderPipelineFunction() { _state = nullptr; };
43
44 void setState(const SoView2DShaderState* state) {
45 _state = state;
46 }
47
48 protected:
50 };
51
53 {
54 public:
56
58 _overlay = overlay;
59 }
60
61 void appendName(std::stringstream& str) const override;
62
63 protected:
65 };
66
74}
#define SO_DECLARE_PIPELINE_FUNCTION_CLASS(className, baseClassName)
#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 ...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.