MeVisLab Resolution Independence API
SoFramebufferSampler Class Reference

Abstract Open Inventor base class for sampler nodes based on a framebuffer object. More...

#include <SoFramebufferSampler.h>

Inheritance diagram for SoFramebufferSampler:
SoSampler SoUniformShaderParameter SoShaderParameter SoFramebufferSampler2D SoFramebufferSampler3D SoMultiPassFramebufferSampler

Public Types

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

 SoFramebufferSampler ()
 Constructor.
 
void GLRender (SoGLRenderAction *action) override
 Add node to parameter list element, and call 'updatePreparation'.
 
void getBoundingBox (SoGetBoundingBoxAction *action) override
 Compute bounding-box of subgraph.
 
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.
 
void updatePreparationInternal (SoGLRenderAction *action)
 Helper method to call updatePreparation.
 
- Public Member Functions inherited from SoSampler
void updateParameter (SoUniformParameterBase *uniformBase, SoState *state) override
 Assigns or updates the parameter's value.
 
- Public Member Functions inherited from SoUniformShaderParameter
void GLRender (SoGLRenderAction *action) override
 Add this node to element in state.
 
virtual void updatePreparation (SoState *)
 Hook for internal preparation steps.
 
- Public Member Functions inherited from SoShaderParameter
void callback (SoCallbackAction *) override
 Shut down handling of these actions for children.
 
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 resetFixedFunctionGLState ()
 Resets the current GL state as far as possible (but leaves FBO intact, to allow push/pop later)
 
static void initClass ()
 Initialize class with runtime type system.
 
- Static Public Member Functions inherited from SoSampler
static void initClass ()
 Initialize class with runtime type system.
 
- Static Public Member Functions inherited from SoUniformShaderParameter
static void initClass ()
 Initialize class with runtime type system.
 
- Static Public Member Functions inherited from SoShaderParameter
static void initClass ()
 Initialize class with runtime type system.
 

Public Attributes

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

Protected Member Functions

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

Protected Attributes

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
 
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.
 
SbString _sizeUniformName
 name of the uniform ?_size parameter
 
unsigned int _textureComponents
 
GLenum _textureDataType
 

Detailed Description

Abstract Open Inventor base class for sampler nodes based on a framebuffer object.

Definition at line 35 of file SoFramebufferSampler.h.

Member Enumeration Documentation

◆ ColorBufferFormat

Internal texture format for color buffer.

Enumerator
RGB 
RGB8 
RGB16 
RGB16F 
RGB32F 
RGBA 
RGBA8 
RGBA16 
RGBA16F 
RGBA32F 

Definition at line 44 of file SoFramebufferSampler.h.

◆ DepthBufferTarget

Depth buffer mode.

Enumerator
NONE 
RENDERBUFFER 
TEXTURE 

Definition at line 58 of file SoFramebufferSampler.h.

Constructor & Destructor Documentation

◆ SoFramebufferSampler()

SoFramebufferSampler::SoFramebufferSampler ( )

Constructor.

◆ ~SoFramebufferSampler()

SoFramebufferSampler::~SoFramebufferSampler ( )
overrideprotected

Destructor.

Member Function Documentation

◆ applyRenderAction()

virtual void SoFramebufferSampler::applyRenderAction ( SoState * )
protectedvirtual

Function applies render action to children.

Reimplemented in SoMultiPassFramebufferSampler.

◆ getBoundingBox()

void SoFramebufferSampler::getBoundingBox ( SoGetBoundingBoxAction * action)
override

Compute bounding-box of subgraph.

◆ GLRender()

void SoFramebufferSampler::GLRender ( SoGLRenderAction * action)
override

Add node to parameter list element, and call 'updatePreparation'.

◆ handleEvent()

void SoFramebufferSampler::handleEvent ( SoHandleEventAction * action)
override

◆ initClass()

static void SoFramebufferSampler::initClass ( )
static

Initialize class with runtime type system.

◆ nameChanged()

void SoFramebufferSampler::nameChanged ( SoField * field)
overrideprotectedvirtual

Called when sampler name has changed.

Reimplemented from SoSampler.

◆ renderInSeparateRenderAction()

void SoFramebufferSampler::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.

◆ resetFixedFunctionGLState()

static void SoFramebufferSampler::resetFixedFunctionGLState ( )
static

Resets the current GL state as far as possible (but leaves FBO intact, to allow push/pop later)

◆ updatePreparationInternal()

void SoFramebufferSampler::updatePreparationInternal ( SoGLRenderAction * action)

Helper method to call updatePreparation.

Member Data Documentation

◆ _colorBuffer

SoGLTexture* SoFramebufferSampler::_colorBuffer
protected

Definition at line 124 of file SoFramebufferSampler.h.

◆ _dataFormat

int32_t SoFramebufferSampler::_dataFormat
protected

Definition at line 118 of file SoFramebufferSampler.h.

◆ _depthBufferRBU

SoGLRenderbuffer* SoFramebufferSampler::_depthBufferRBU
protected

Definition at line 125 of file SoFramebufferSampler.h.

◆ _depthBufferTEX

SoGLTexture* SoFramebufferSampler::_depthBufferTEX
protected

Definition at line 126 of file SoFramebufferSampler.h.

◆ _depthTextureName

SbString SoFramebufferSampler::_depthTextureName
protected

name of the uniform ?_depth parameter

Definition at line 121 of file SoFramebufferSampler.h.

◆ _fldValColorBufferFormat

ColorBufferFormat SoFramebufferSampler::_fldValColorBufferFormat
protected

Definition at line 112 of file SoFramebufferSampler.h.

◆ _fldValDepthBufferTarget

DepthBufferTarget SoFramebufferSampler::_fldValDepthBufferTarget
protected

Definition at line 113 of file SoFramebufferSampler.h.

◆ _fldValStencilBuffer

SbBool SoFramebufferSampler::_fldValStencilBuffer
protected

Definition at line 114 of file SoFramebufferSampler.h.

◆ _fldValUseFormatHints

SbBool SoFramebufferSampler::_fldValUseFormatHints
protected

Definition at line 111 of file SoFramebufferSampler.h.

◆ _fldValUseSizeHints

SbBool SoFramebufferSampler::_fldValUseSizeHints
protected

Definition at line 110 of file SoFramebufferSampler.h.

◆ _framebufferObject

SoGLFramebufferObject* SoFramebufferSampler::_framebufferObject
protected

Definition at line 123 of file SoFramebufferSampler.h.

◆ _offscreenSceneRenderer

SoFramebufferSamplerOffscreenSceneRenderer* SoFramebufferSampler::_offscreenSceneRenderer
protected

Definition at line 131 of file SoFramebufferSampler.h.

◆ _proxy

SoResolutionIndependentViewerProxy* SoFramebufferSampler::_proxy
protected

Definition at line 129 of file SoFramebufferSampler.h.

◆ _rebuild

SbBool SoFramebufferSampler::_rebuild
protected

Definition at line 116 of file SoFramebufferSampler.h.

◆ _stencilBuffer

SoGLRenderbuffer* SoFramebufferSampler::_stencilBuffer
protected

Definition at line 127 of file SoFramebufferSampler.h.

◆ _takeSnapshot

SbBool SoFramebufferSampler::_takeSnapshot
protected

Definition at line 117 of file SoFramebufferSampler.h.

◆ automaticTraversal

SoSFBool SoFramebufferSampler::automaticTraversal

Automatically traverse child scene.

Definition at line 96 of file SoFramebufferSampler.h.

◆ clearAlpha

SoSFFloat SoFramebufferSampler::clearAlpha

Alpha value used to clear the color buffer.

Definition at line 77 of file SoFramebufferSampler.h.

◆ clearColor

SoSFColor SoFramebufferSampler::clearColor

Color used to clear the color buffer.

Definition at line 74 of file SoFramebufferSampler.h.

◆ colorBufferFormat

SoSFEnum SoFramebufferSampler::colorBufferFormat

Internal format of color buffer. Default is RGBA.

Definition at line 65 of file SoFramebufferSampler.h.

◆ depthBufferTarget

SoSFEnum SoFramebufferSampler::depthBufferTarget

Enable/Disable depth buffer. Default is TRUE.

Definition at line 68 of file SoFramebufferSampler.h.

◆ sizeMultiplier

SoSFFloat SoFramebufferSampler::sizeMultiplier

Size provided by size state hints is multiplied with this value.

Definition at line 89 of file SoFramebufferSampler.h.

◆ stencilBuffer

SoSFBool SoFramebufferSampler::stencilBuffer

Enable/Disable stencil buffer. Default is FALSE.

Definition at line 71 of file SoFramebufferSampler.h.

◆ takeSnapshot

SoSFTrigger SoFramebufferSampler::takeSnapshot

Take a snapshot of the scene.

Definition at line 99 of file SoFramebufferSampler.h.

◆ useFormatStateHints

SoSFBool SoFramebufferSampler::useFormatStateHints

Read state for format hints.

Definition at line 86 of file SoFramebufferSampler.h.

◆ useSeparateRenderAction

SoSFBool SoFramebufferSampler::useSeparateRenderAction

If enabled, a separate offscreen renderaction is used instead of the render action of the scene above the node itself.

Definition at line 103 of file SoFramebufferSampler.h.

◆ useSizeStateHints

SoSFBool SoFramebufferSampler::useSizeStateHints

Read state for size hints.

Definition at line 83 of file SoFramebufferSampler.h.

◆ wrapT

SoSFEnum SoFramebufferSampler::wrapT

Wrapping mode.

Definition at line 80 of file SoFramebufferSampler.h.


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