SoFrameBufferObject Class Reference
[General]

VSG extension Create an OpenGL FrameBuffer More...

#include <Inventor/SoFrameBufferObject.h>

Inheritance diagram for SoFrameBufferObject:
SoGLRenderToBuffer

List of all members.

Public Types

enum  Attachment {
  COLOR_ATTACHMENT0,
  COLOR_ATTACHMENT1,
  COLOR_ATTACHMENT2,
  COLOR_ATTACHMENT3,
  COLOR_ATTACHMENT4,
  COLOR_ATTACHMENT5,
  COLOR_ATTACHMENT6,
  COLOR_ATTACHMENT7,
  COLOR_ATTACHMENT8,
  COLOR_ATTACHMENT9,
  COLOR_ATTACHMENT10,
  COLOR_ATTACHMENT11,
  COLOR_ATTACHMENT12,
  COLOR_ATTACHMENT13,
  COLOR_ATTACHMENT14,
  COLOR_ATTACHMENT15,
  DEPTH_ATTACHMENT,
  STENCIL_ATTACHMENT,
  DEPTH_STENCIL_ATTACHMENT,
  LAST_ATTACHMENT
}

Public Member Functions

 SoFrameBufferObject ()
 ~SoFrameBufferObject ()
void setSamplesCount (int samples)
int getActualSamplesCount () const
SbBool resize (const SbVec2s &size)
SbVec2s getSize () const
void setRenderToTexture (SbBool enable, TextureFormat format=TEXTURE_RGB, TextureTarget target=TEXTURE_2D, SbBool autoMipmap=FALSE, SbBool hasDepth=FALSE)
GLuint getTexture () const
GLenum getTextureFormat () const
GLenum getTextureTarget () const
SbBool bind (SoState *state=NULL, bool bindMultisampleFBO=true)
void unbind ()
void flush (SoState *state=NULL)
SbBool bindToTexture (SbBool bindDepth=FALSE, GLuint texObj=-1)
SbBool create (SbVec2s size)
SbBool create (SbVec2i32 size)
SbBool resize (const SbVec2i32 &size)
const SbVec2i32getSize_i32 () const

Static Public Member Functions

static void initClass ()
static void exitClass ()
static SbBool isAvailable (SoState *state=NULL)
static SbBool isMultisamplingAvailable (SoState *state=NULL)
static int getMaxSamples (SoState *state=NULL)

Deprecated



SoDEPRECATED SbBool makeCurrent ()
SoDEPRECATED void disable ()
SoDEPRECATED void setGraphicConfigTemplate (SoGLGraphicConfigTemplate *gTemplate)
SoDEPRECATED
SoGLGraphicConfigTemplate
getGraphicConfigTemplate ()
SoDEPRECATED void setPixelFormat (int format)
SoDEPRECATED int getPixelFormat ()
SoDEPRECATED SbBool releaseTexImage (SbBool bindDepth=FALSE)
SoDEPRECATED SbBool selectCubeMapFace (CubeMapTextureFace face)
SoDEPRECATED void setDisplayConnection (SbGlContextHelper::Display)
SoDEPRECATED void setContextForSharing (SoGLContext *context)

Detailed Description

VSG extension Create an OpenGL FrameBuffer

This class encapsulates an OpenGL FrameBuffer object (FBO) which may be used for accelerated off-screen rendering. Unlike a pixmap or offscreen bitmap, a FrameBuffer is allocated in frame buffer memory and can be rendered to directly by the graphics hardware. Unlike Pbuffer, this object is not dependent on the windowing system and shares the current OpenGL context.

FrameBuffers are only available if the graphics hardware supports OpenGL 2.0 or the OpenGL framebufferobject extension. This extension is named "GL_frame_buffer_object".

NOTE: This class does not exist in Open Inventor 10.0 and later. Use SoRenderToTarget.

SEE ALSO

SoPBuffer, SoOffscreenRenderer

Deprecated:

Deprecated since Open Inventor 9610
No longer supported, use SoRenderToTarget instead

Member Enumeration Documentation

Attachement.

Enumerator:
COLOR_ATTACHMENT0 

Color attachment 0.

COLOR_ATTACHMENT1 

Color attachment 1.

COLOR_ATTACHMENT2 

Color attachment 2.

COLOR_ATTACHMENT3 

Color attachment 3.

COLOR_ATTACHMENT4 

Color attachment 4.

COLOR_ATTACHMENT5 

Color attachment 5.

COLOR_ATTACHMENT6 

Color attachment 6.

COLOR_ATTACHMENT7 

Color attachment 7.

COLOR_ATTACHMENT8 

Color attachment 8.

COLOR_ATTACHMENT9 

Color attachment 9.

COLOR_ATTACHMENT10 

Color attachment 10.

COLOR_ATTACHMENT11 

Color attachment 11.

COLOR_ATTACHMENT12 

Color attachment 12.

COLOR_ATTACHMENT13 

Color attachment 13.

COLOR_ATTACHMENT14 

Color attachment 14.

COLOR_ATTACHMENT15 

Color attachment 15.

DEPTH_ATTACHMENT 

Depth attachment.

STENCIL_ATTACHMENT 

Stencil attachment.

DEPTH_STENCIL_ATTACHMENT 

Depth stencil attachment.

LAST_ATTACHMENT 

Last attachment.


Constructor & Destructor Documentation

SoFrameBufferObject::SoFrameBufferObject (  ) 

Constructor.

Creates an object of this class but does *not* create the FrameBuffer until resize is called.

SoFrameBufferObject::~SoFrameBufferObject (  ) 

Destructor.


Member Function Documentation

SbBool SoFrameBufferObject::bind ( SoState state = NULL,
bool  bindMultisampleFBO = true 
)

Set this Framebuffer as the current rendering target.

SbBool SoFrameBufferObject::bindToTexture ( SbBool  bindDepth = FALSE,
GLuint  texObj = -1 
) [virtual]

Attach the framebuffer to the current texture object.


If bindDepth is set to TRUE, attach the depth instead of the color buffer.

Implements SoGLRenderToBuffer.

SbBool SoFrameBufferObject::create ( SbVec2i32  size  )  [virtual]

Create a framebuffer with the specified size.


For sizes greater than 32767. Returns TRUE if successful

Implements SoGLRenderToBuffer.

SbBool SoFrameBufferObject::create ( SbVec2s  size  )  [virtual]

Create a framebuffer with the specified size.


Limited to 32767. Returns TRUE if successful

Implements SoGLRenderToBuffer.

SoDEPRECATED void SoFrameBufferObject::disable (  )  [virtual]
Deprecated:

Deprecated since Open Inventor 9300
Use unbind instead.

Implements SoGLRenderToBuffer.

static void SoFrameBufferObject::exitClass (  )  [static]

Cleans the Frame buffer object class.

void SoFrameBufferObject::flush ( SoState state = NULL  ) 

Blit the multisampling FBO to the regular FBO.

This function must be called before using the result of the frame buffer operation. If there is no MSAA FBO active the function doesn't do anything, so it is safe to call it all the time.

int SoFrameBufferObject::getActualSamplesCount (  )  const

Returns the number of samples actually used by the FBO.

The value is not correct right after a call to setSamplesCount but after the first bind/unbind operation.

SoDEPRECATED SoGLGraphicConfigTemplate* SoFrameBufferObject::getGraphicConfigTemplate (  )  [virtual]
Deprecated:

Deprecated since Open Inventor 9300
No Effect. Compatibility with PBuffer.

Reimplemented from SoGLRenderToBuffer.

static int SoFrameBufferObject::getMaxSamples ( SoState state = NULL  )  [static]

Returns the maximum number of samples usable for multisampling.

SoDEPRECATED int SoFrameBufferObject::getPixelFormat (  )  [virtual]
Deprecated:

Deprecated since Open Inventor 9300
No Effect. Compatibility with PBuffer.

Reimplemented from SoGLRenderToBuffer.

SbVec2s SoFrameBufferObject::getSize (  )  const [virtual]

Gets current size as an SbVec2s.

Implements SoGLRenderToBuffer.

const SbVec2i32& SoFrameBufferObject::getSize_i32 (  )  const [virtual]

Create a framebuffer with the specified size.


For sizes greater than 32767. Returns TRUE if successful

Implements SoGLRenderToBuffer.

GLuint SoFrameBufferObject::getTexture (  )  const

Returns the attached texture ID.

GLenum SoFrameBufferObject::getTextureFormat (  )  const

Returns the attached texture Format.

GLenum SoFrameBufferObject::getTextureTarget (  )  const

Returns the attached texture Target.

static void SoFrameBufferObject::initClass (  )  [static]

Inits the Frame buffer object class.

static SbBool SoFrameBufferObject::isAvailable ( SoState state = NULL  )  [static]

Returns TRUE if FrameBuffers are available on this system.


There is no guarantee it is possible to create a framebuffer (depends on requested size, available memory, etc).

static SbBool SoFrameBufferObject::isMultisamplingAvailable ( SoState state = NULL  )  [static]

Returns TRUE if multisampling is available for FrameBuffers on this system.


There is no guarantee it is possible to enable multisampling (depends on requested samples).

SoDEPRECATED SbBool SoFrameBufferObject::makeCurrent (  )  [virtual]
SoDEPRECATED SbBool SoFrameBufferObject::releaseTexImage ( SbBool  bindDepth = FALSE  )  [virtual]
Deprecated:

Deprecated since Open Inventor 9300
No Effect. Compatibility with PBuffer.

Implements SoGLRenderToBuffer.

SbBool SoFrameBufferObject::resize ( const SbVec2i32 size  )  [virtual]

Resize framebuffer.


Limited to 32767. Returns TRUE if successful

Implements SoGLRenderToBuffer.

SbBool SoFrameBufferObject::resize ( const SbVec2s size  )  [virtual]

Resize the FrameBuffer.

Implements SoGLRenderToBuffer.

SoDEPRECATED SbBool SoFrameBufferObject::selectCubeMapFace ( CubeMapTextureFace  face  )  [virtual]
Deprecated:

Deprecated since Open Inventor 9300
No Effect. Compatibility with PBuffer.

Implements SoGLRenderToBuffer.

SoDEPRECATED void SoFrameBufferObject::setContextForSharing ( SoGLContext context  )  [inline, virtual]
Deprecated:

Deprecated since Open Inventor 9300
No Effect. Compatibility with PBuffer.

Reimplemented from SoGLRenderToBuffer.

SoDEPRECATED void SoFrameBufferObject::setDisplayConnection ( SbGlContextHelper::Display   )  [inline, virtual]
Deprecated:

Deprecated since Open Inventor 9300
No Effect. Compatibility with PBuffer.

Reimplemented from SoGLRenderToBuffer.

SoDEPRECATED void SoFrameBufferObject::setGraphicConfigTemplate ( SoGLGraphicConfigTemplate gTemplate  )  [virtual]
Deprecated:

Deprecated since Open Inventor 9300
No Effect. Compatibility with PBuffer.

Reimplemented from SoGLRenderToBuffer.

SoDEPRECATED void SoFrameBufferObject::setPixelFormat ( int  format  )  [virtual]
Deprecated:

Deprecated since Open Inventor 9300
No Effect. Compatibility with PBuffer.

Reimplemented from SoGLRenderToBuffer.

void SoFrameBufferObject::setRenderToTexture ( SbBool  enable,
TextureFormat  format = TEXTURE_RGB,
TextureTarget  target = TEXTURE_2D,
SbBool  autoMipmap = FALSE,
SbBool  hasDepth = FALSE 
)

Specifies settings for the FrameBuffer creation.

Indicates if it must be created to be compliant with rendering to texture and also sets texture attributes.

void SoFrameBufferObject::setSamplesCount ( int  samples  ) 

Sets the number of samples for multisampling.

void SoFrameBufferObject::unbind (  ) 

Set the previous framebuffer object as the rendering target.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/