MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 00006 00007 00008 #ifndef _SO_MULTIPASS_FRAMEBUFFER_SAMPLER_ 00009 #define _SO_MULTIPASS_FRAMEBUFFER_SAMPLER_ 00010 00011 #include "SoShaderSystem.h" 00012 #include "Inventor/nodes/SoFramebufferSampler2D.h" 00013 #include <Inventor/fields/SoSFUInt32.h> 00014 #include <Inventor/fields/SoSFFloat.h> 00015 #include <Inventor/fields/SoSFBool.h> 00016 #include <Inventor/SbLinear.h> 00017 00018 class SoGLFramebufferObject; 00019 class SoGLTexture; 00020 00022 class INVENTOR_SHADER_API SoMultiPassFramebufferSampler : public SoFramebufferSampler2D 00023 { 00024 typedef SoFramebufferSampler2D inherited; 00025 00026 SO_NODE_HEADER(SoMultiPassFramebufferSampler); 00027 00028 public: 00029 00031 SoSFUInt32 numPasses; 00032 00034 SoSFFloat epsilon; 00035 00037 SoSFFloat value; 00038 00040 SoSFUInt32 id; 00041 00043 SoSFBool initSamplerCopy; 00044 00046 SoMultiPassFramebufferSampler(); 00047 00048 SoINTERNAL public: 00049 00051 static void initClass(); 00052 00054 unsigned int curPass() { 00055 return _curPass; 00056 } 00057 00058 SoEXTENDER public: 00059 00060 SoGLTexture *getCopyColorBuffer() const { 00061 return _copyColorBuffer; 00062 } 00063 00064 protected: 00065 00066 unsigned int _curPass; 00067 SbVec2s _prevSize; 00068 uint32_t _prevFormat; 00069 00071 virtual ~SoMultiPassFramebufferSampler(); 00072 00074 virtual void applyRenderAction(SoState *); 00075 00076 private: 00077 00078 SoGLFramebufferObject *_copyFramebufferObject; 00079 SoGLTexture *_copyColorBuffer; 00080 }; 00081 00082 #endif // _SO_MULTIPASS_FRAMEBUFFER_SAMPLER_