MeVisLab Toolbox Reference
SoFramebufferSampler2D.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, 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 #ifndef SO_FRAMEBUFFER_SAMPLER2_D_H
14 #define SO_FRAMEBUFFER_SAMPLER2_D_H
15 
16 
18 
19 #include "SoShaderSystem.h"
21 #include <Inventor/fields/SoSFVec2s.h>
22 #include <Inventor/fields/SoSFInt32.h>
23 #include <Inventor/fields/SoSFEnum.h>
24 
26 class INVENTOR_SHADER_API SoFramebufferSampler2D : public SoFramebufferSampler
27 {
29 
30  SO_NODE_HEADER(SoFramebufferSampler2D);
31 
32  public:
33 
37  MULTISAMPLING_TEXTURE
38  };
39 
41  SoSFVec2s size;
42 
44  SoSFInt32 multiSampling;
45 
48 
49  protected:
50 
51  SbVec2s _fldValSize;
52  SbVec2s _size;
53 
54  SoGLFramebufferObject* _msaaFBO;
55  SoGLRenderbuffer* _msaaDepthBuffer;
56  SoGLRenderbuffer* _msaaColorBuffer;
59 
62 
63  SoEXTENDER public:
64 
66  void updatePreparation(SoState *state) override;
67 
68  void renderDebug( SoState * state );
69 
71  void updateParameter(SoUniformParameterBase *, SoState *) override;
72 
73  SoINTERNAL public:
74 
76  static void initClass();
77 };
78 
79 #endif // _SO_FRAMEBUFFER_SAMPLER_2D_
Open Inventor sampler node that gets it's 2D image from a framebuffer object.
@ MULTISAMPLING_ON
No multi sampling.
SoFramebufferSampler2D()
Constructor.
SoGLFramebufferObject * _msaaFBO
void updatePreparation(SoState *state) override
Render children to framebuffer object.
static void initClass()
Initialize class with runtime type system.
SoGLRenderbuffer * _msaaColorBuffer
~SoFramebufferSampler2D() override
Destructor.
void updateParameter(SoUniformParameterBase *, SoState *) override
Update sampler uniform to inform shader about fbo texture.
void renderDebug(SoState *state)
SoGLRenderbuffer * _msaaDepthBuffer
SoSFVec2s size
Texture size. Default is 64 x 64.
Abstract Open Inventor base class for sampler nodes based on a framebuffer object.
Abstract Open Inventor base class for sampler nodes.
Definition: SoSampler.h:30
Base class for uniform shader parameters.