MeVisLab Resolution Independence API
SoFramebufferSampler2D Class Reference

Open Inventor sampler node that gets it's 2D image from a framebuffer object. More...

#include <SoFramebufferSampler2D.h>

Inheritance diagram for SoFramebufferSampler2D:
SoFramebufferSampler SoSampler SoUniformShaderParameter SoShaderParameter SoMultiPassFramebufferSampler

Public Types

enum  MultiSamplingMode { MULTISAMPLING_OFF , MULTISAMPLING_ON , MULTISAMPLING_TEXTURE }
 
- Public Types inherited from SoFramebufferSampler
enum  ColorBufferFormat {
  RGB = GL_RGB , RGB8 = GL_RGB8 , RGB16 = GL_RGB16 , RGB16F = GL_RGB16F_ARB ,
  RGB32F = GL_RGB32F_ARB , RGBA = GL_RGBA , RGBA8 = GL_RGBA8 , RGBA16 = GL_RGBA16 ,
  RGBA16F = GL_RGBA16F_ARB , RGBA32F = GL_RGBA32F_ARB
}
 Internal texture format for color buffer. More...
 
enum  DepthBufferTarget { NONE = 0 , RENDERBUFFER = 1 , TEXTURE = 2 }
 Depth buffer mode. More...
 
- Public Types inherited from SoSampler
enum  TexGenMode { NORMAL_MAP = GL_NORMAL_MAP_EXT , REFLECTION_MAP = GL_REFLECTION_MAP_EXT }
 Texture gen mode. More...
 
enum  Wrap {
  REPEAT = GL_REPEAT , CLAMP = GL_CLAMP , CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE , CLAMP_TO_BORDER = GL_CLAMP_TO_BORDER ,
  MIRRORED_REPEAT = GL_MIRRORED_REPEAT
}
 Texture wrap type. More...
 
enum  Filter {
  NEAREST = GL_NEAREST , LINEAR = GL_LINEAR , NEAREST_MIPMAP_NEAREST = GL_NEAREST_MIPMAP_NEAREST , NEAREST_MIPMAP_LINEAR = GL_NEAREST_MIPMAP_LINEAR ,
  LINEAR_MIPMAP_NEAREST = GL_LINEAR_MIPMAP_NEAREST , LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR
}
 Filter methods for minification and magnification. More...
 

Public Member Functions

 SoFramebufferSampler2D ()
 Constructor. More...
 
void updatePreparation (SoState *state) override
 Render children to framebuffer object. More...
 
void renderDebug (SoState *state)
 
void updateParameter (SoUniformParameterBase *, SoState *) override
 Update sampler uniform to inform shader about fbo texture. More...
 
- Public Member Functions inherited from SoFramebufferSampler
 SoFramebufferSampler ()
 Constructor. More...
 
void GLRender (SoGLRenderAction *action) override
 Add node to parameter list element, and call 'updatePreparation'. More...
 
void getBoundingBox (SoGetBoundingBoxAction *action) override
 Compute bounding-box of subgraph. More...
 
void handleEvent (SoHandleEventAction *action) override
 
void renderInSeparateRenderAction ()
 Renders in an extra render action and tries to reset the GL state as far as possible to avoid that the scene below is affected by above state. More...
 
void updatePreparationInternal (SoGLRenderAction *action)
 Helper method to call updatePreparation. More...
 
- Public Member Functions inherited from SoSampler
void updateParameter (SoUniformParameterBase *uniformBase, SoState *state) override
 Assigns or updates the parameter's value. More...
 
- Public Member Functions inherited from SoUniformShaderParameter
void GLRender (SoGLRenderAction *action) override
 Add this node to element in state. More...
 
- Public Member Functions inherited from SoShaderParameter
void callback (SoCallbackAction *) override
 Shut down handling of these actions for children. More...
 
void GLRender (SoGLRenderAction *) override
 
void getBoundingBox (SoGetBoundingBoxAction *) override
 
void getMatrix (SoGetMatrixAction *) override
 
void handleEvent (SoHandleEventAction *) override
 
void pick (SoPickAction *) override
 

Static Public Member Functions

static void initClass ()
 Initialize class with runtime type system. More...
 
- Static Public Member Functions inherited from SoFramebufferSampler
static void resetFixedFunctionGLState ()
 Resets the current GL state as far as possible (but leaves FBO intact, to allow push/pop later) More...
 
static void initClass ()
 Initialize class with runtime type system. More...
 
- Static Public Member Functions inherited from SoSampler
static void initClass ()
 Initialize class with runtime type system. More...
 
- Static Public Member Functions inherited from SoUniformShaderParameter
static void initClass ()
 Initialize class with runtime type system. More...
 
- Static Public Member Functions inherited from SoShaderParameter
static void initClass ()
 Initialize class with runtime type system. More...
 

Public Attributes

SoSFVec2s size
 Texture size. Default is 64 x 64. More...
 
SoSFEnum multiSamplingMode
 
SoSFInt32 multiSampling
 
- Public Attributes inherited from SoFramebufferSampler
SoSFEnum colorBufferFormat
 Internal format of color buffer. Default is RGBA. More...
 
SoSFEnum depthBufferTarget
 Enable/Disable depth buffer. Default is TRUE. More...
 
SoSFBool stencilBuffer
 Enable/Disable stencil buffer. Default is FALSE. More...
 
SoSFColor clearColor
 Color used to clear the color buffer. More...
 
SoSFFloat clearAlpha
 Alpha value used to clear the color buffer. More...
 
SoSFEnum wrapT
 Wrapping mode. More...
 
SoSFBool useSizeStateHints
 Read state for size hints. More...
 
SoSFBool useFormatStateHints
 Read state for format hints. More...
 
SoSFFloat sizeMultiplier
 Size provided by size state hints is multiplied with this value. More...
 
SoSFFloat pixelScale
 Scale factor for pixel size. More...
 
SoSFBool automaticTraversal
 Automatically traverse child scene. More...
 
SoSFTrigger takeSnapshot
 Take a snapshot of the scene. More...
 
SoSFBool useSeparateRenderAction
 If enabled, a separate offscreen renderaction is used instead of the render action of the scene above the node itself. More...
 
- Public Attributes inherited from SoSampler
SoSFEnum wrapS
 Wrapping mode. Default is REPEAT. More...
 
SoSFBool enableBorder
 Enable border to be part of the texture. Default is FALSE. More...
 
SoSFVec4f borderColor
 Border color used to for border texture filtering. Only used if 'enableBorder' is FALSE. Default is (0, 0, 0, 0). More...
 
SoSFEnum minFilter
 Minification filter mode. Default is LINEAR. More...
 
SoSFEnum magFilter
 Magnification filter mode. Default is LINEAR. More...
 
SoSFBool use16BitFloat
 Use 16 Bit floating point for the texture format. More...
 
SoSFBool needsTextureCoordinates
 Enable this if the sampler needs the standard inventor texture coordinates. More...
 
- Public Attributes inherited from SoUniformShaderParameter
std::set< SbString > auxUniformParameters
 Auxiliary uniform shader parameters which are maintained by this node. More...
 
- Public Attributes inherited from SoShaderParameter
SoSFString name
 Name given to parameter in high level languages. More...
 

Protected Member Functions

 ~SoFramebufferSampler2D () override
 Destructor. More...
 
- Protected Member Functions inherited from SoFramebufferSampler
 ~SoFramebufferSampler () override
 Destructor. More...
 
virtual void applyRenderAction (SoState *)
 Function applies render action to children. More...
 
void nameChanged (SoField *field) override
 Called when sampler name has changed. More...
 
- Protected Member Functions inherited from SoSampler
 ~SoSampler () override
 
 SoSampler ()
 Constructor. More...
 
GLint getInternalFormat (GLenum glDataType)
 Return specialized texture format for GL data type. More...
 
const char * getTextureFormatName (GLenum internalFormat)
 Return texture format name. More...
 
SbSamplerInfo::TextureType getTextureTypeFromGLFormat (GLenum internalFormat)
 
void postTextureFormatInfo (GLenum target, GLint format)
 Prints channel depths for given target and format. More...
 
void postTextureSizeInfo (GLenum target)
 Prints the size of the bound texture. More...
 
virtual void texConfigChanged (SoField *)
 Called when texture configuration (e.g. filter mode) has changed. More...
 
- Protected Member Functions inherited from SoUniformShaderParameter
 SoUniformShaderParameter ()
 Constructor. More...
 
- Protected Member Functions inherited from SoShaderParameter
 SoShaderParameter ()
 Constructor. More...
 

Protected Attributes

SbVec2s _fldValSize
 
SbVec2s _size
 
SoGLFramebufferObject * _msaaFBO
 
SoGLRenderbuffer * _msaaDepthBuffer
 
SoGLRenderbuffer * _msaaColorBuffer
 
MultiSamplingMode _msaaMode
 
int _msaaSamples
 
- Protected Attributes inherited from SoFramebufferSampler
SbBool _fldValUseSizeHints
 
SbBool _fldValUseFormatHints
 
ColorBufferFormat _fldValColorBufferFormat
 
DepthBufferTarget _fldValDepthBufferTarget
 
SbBool _fldValStencilBuffer
 
SbBool _rebuild
 
SbBool _takeSnapshot
 
int32_t _dataFormat
 
SbString _depthTextureName
 name of the uniform ?_depth parameter More...
 
SoGLFramebufferObject * _framebufferObject
 
SoGLTexture * _colorBuffer
 
SoGLRenderbuffer * _depthBufferRBU
 
SoGLTexture * _depthBufferTEX
 
SoGLRenderbuffer * _stencilBuffer
 
SoResolutionIndependentViewerProxy_proxy
 
SoFramebufferSamplerOffscreenSceneRenderer * _offscreenSceneRenderer
 
- Protected Attributes inherited from SoSampler
SbBool _hasTextureFloat
 TRUE if GL_xxx_texture_float extension is present. More...
 
SbString _sizeUniformName
 name of the uniform ?_size parameter More...
 
unsigned int _textureComponents
 
GLenum _textureDataType
 

Detailed Description

Open Inventor sampler node that gets it's 2D image from a framebuffer object.

Open Inventor sampler node that gets it's 2D image from a framebuffer object.

Definition at line 26 of file SoFramebufferSampler2D.h.

Member Enumeration Documentation

◆ MultiSamplingMode

Enumerator
MULTISAMPLING_OFF 
MULTISAMPLING_ON 

No multi sampling.

MULTISAMPLING_TEXTURE 

Renders to a MSAA render buffer and resolves by copying to a texture.

Renders to a MSAA texture (resolving needs to be done manually in a shader

Definition at line 34 of file SoFramebufferSampler2D.h.

Constructor & Destructor Documentation

◆ SoFramebufferSampler2D()

SoFramebufferSampler2D::SoFramebufferSampler2D ( )

Constructor.

◆ ~SoFramebufferSampler2D()

SoFramebufferSampler2D::~SoFramebufferSampler2D ( )
overrideprotected

Destructor.

Member Function Documentation

◆ initClass()

static void SoFramebufferSampler2D::initClass ( )
static

Initialize class with runtime type system.

◆ renderDebug()

void SoFramebufferSampler2D::renderDebug ( SoState *  state)

◆ updateParameter()

void SoFramebufferSampler2D::updateParameter ( SoUniformParameterBase ,
SoState *   
)
overridevirtual

Update sampler uniform to inform shader about fbo texture.

Implements SoUniformShaderParameter.

◆ updatePreparation()

void SoFramebufferSampler2D::updatePreparation ( SoState *  state)
overridevirtual

Render children to framebuffer object.

Reimplemented from SoUniformShaderParameter.

Member Data Documentation

◆ _fldValSize

SbVec2s SoFramebufferSampler2D::_fldValSize
protected

Definition at line 51 of file SoFramebufferSampler2D.h.

◆ _msaaColorBuffer

SoGLRenderbuffer* SoFramebufferSampler2D::_msaaColorBuffer
protected

Definition at line 56 of file SoFramebufferSampler2D.h.

◆ _msaaDepthBuffer

SoGLRenderbuffer* SoFramebufferSampler2D::_msaaDepthBuffer
protected

Definition at line 55 of file SoFramebufferSampler2D.h.

◆ _msaaFBO

SoGLFramebufferObject* SoFramebufferSampler2D::_msaaFBO
protected

Definition at line 54 of file SoFramebufferSampler2D.h.

◆ _msaaMode

MultiSamplingMode SoFramebufferSampler2D::_msaaMode
protected

Definition at line 57 of file SoFramebufferSampler2D.h.

◆ _msaaSamples

int SoFramebufferSampler2D::_msaaSamples
protected

Definition at line 58 of file SoFramebufferSampler2D.h.

◆ _size

SbVec2s SoFramebufferSampler2D::_size
protected

Definition at line 52 of file SoFramebufferSampler2D.h.

◆ multiSampling

SoSFInt32 SoFramebufferSampler2D::multiSampling

Definition at line 44 of file SoFramebufferSampler2D.h.

◆ multiSamplingMode

SoSFEnum SoFramebufferSampler2D::multiSamplingMode

Definition at line 43 of file SoFramebufferSampler2D.h.

◆ size

SoSFVec2s SoFramebufferSampler2D::size

Texture size. Default is 64 x 64.

Definition at line 41 of file SoFramebufferSampler2D.h.


The documentation for this class was generated from the following file: