MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 00006 00007 00008 #ifndef _SO_FRAMEBUFFER_SAMPLER_2D_ 00009 #define _SO_FRAMEBUFFER_SAMPLER_2D_ 00010 00011 #include "SoShaderSystem.h" 00012 #include "Inventor/nodes/SoFramebufferSampler.h" 00013 #include <Inventor/fields/SoSFVec2s.h> 00014 #include <Inventor/fields/SoSFInt32.h> 00015 #include <Inventor/fields/SoSFEnum.h> 00016 00018 class INVENTOR_SHADER_API SoFramebufferSampler2D : public SoFramebufferSampler 00019 { 00020 typedef SoFramebufferSampler inherited; 00021 00022 SO_NODE_HEADER(SoFramebufferSampler2D); 00023 00024 public: 00025 00026 enum MultiSamplingMode { 00027 MULTISAMPLING_OFF, 00028 MULTISAMPLING_ON, 00029 MULTISAMPLING_TEXTURE 00030 }; 00031 00033 SoSFVec2s size; 00034 00035 SoSFEnum multiSamplingMode; 00036 SoSFInt32 multiSampling; 00037 00039 SoFramebufferSampler2D(); 00040 00041 protected: 00042 00043 SbVec2s _fldValSize; 00044 SbVec2s _size; 00045 00046 SoGLFramebufferObject* _msaaFBO; 00047 SoGLRenderbuffer* _msaaDepthBuffer; 00048 SoGLRenderbuffer* _msaaColorBuffer; 00049 MultiSamplingMode _msaaMode; 00050 int _msaaSamples; 00051 00053 ~SoFramebufferSampler2D(); 00054 00055 SoEXTENDER public: 00056 00058 virtual void updatePreparation(SoState *state); 00059 00060 void renderDebug( SoState * state ); 00061 00063 virtual void updateParameter(SoUniformParameterBase *, SoState *); 00064 00065 SoINTERNAL public: 00066 00068 static void initClass(); 00069 }; 00070 00071 #endif // _SO_FRAMEBUFFER_SAMPLER_2D_