MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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() \
33 : baseClassName() {}; \
34 \
35 protected: \
36 using baseClassName::appendFunctionBody; \
37 virtual void appendFunctionBody(std::stringstream& str, ShaderPipelineTargetContext& context) const; \
38 virtual void updateContext(ShaderPipelineContext& context) const; \
39 };
40
41 class SOVIEW2D_API SoView2DShaderFunction : public ShaderPipelineFunction
42 {
43 public:
45 : ShaderPipelineFunction()
46 {
47 _state = nullptr;
48 };
49
50 void setState(const SoView2DShaderState* state)
51 {
52 _state = state;
53 }
54
55 protected:
57 };
58
60 {
61 public:
64 {
65 _overlay = nullptr;
66 };
67
69 {
70 _overlay = overlay;
71 }
72
73 void appendName(std::stringstream& str) const override;
74
75 protected:
77 };
78
86} // namespace SoView2DShaderBuiltInFunctions
#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.