SoGLRenderToBuffer Class Reference
[General]

VSG extension Render to buffer. More...

#include <Inventor/SoGLRenderToBuffer.h>

Inheritance diagram for SoGLRenderToBuffer:
SoFrameBufferObject SoPBuffer

List of all members.

Public Types

enum  TextureFormat {
  TEXTURE_RGB = 0,
  TEXTURE_RGBA,
  TEXTURE_DEPTH,
  TEXTURE_DEPTH16,
  TEXTURE_DEPTH_RGBA,
  TEXTURE_RGB_FLOAT16,
  TEXTURE_RGBA_FLOAT16,
  TEXTURE_RGB_FLOAT32,
  TEXTURE_RGBA_FLOAT32,
  TEXTURE_STENCIL_INDEX8,
  TEXTURE_STENCIL_INDEX,
  TEXTURE_DEPTH_STENCIL,
  TEXTURE_UNKNOW
}
enum  TextureTarget {
  TEXTURE_1D = 0,
  TEXTURE_2D,
  TEXTURE_3D,
  TEXTURE_CUBE_MAP,
  TEXTURE_RECTANGLE
}
enum  CubeMapTextureFace {
  TEXTURE_CUBE_MAP_POSITIVE_X = 0,
  TEXTURE_CUBE_MAP_POSITIVE_Y,
  TEXTURE_CUBE_MAP_POSITIVE_Z,
  TEXTURE_CUBE_MAP_NEGATIVE_X,
  TEXTURE_CUBE_MAP_NEGATIVE_Y,
  TEXTURE_CUBE_MAP_NEGATIVE_Z
}

Public Member Functions

virtual ~SoGLRenderToBuffer ()
virtual SbBool create (SbVec2s size)=0
virtual SbBool create (SbVec2i32 size)=0
virtual SbBool makeCurrent ()=0
virtual void disable ()=0
void shareCurrentContext ()
virtual void setDisplayConnection (SbGlContextHelper::Display)
virtual void setContextForSharing (SoGLContext *)
virtual SbBool resize (const SbVec2s &size)=0
virtual SbBool resize (const SbVec2i32 &size)=0
virtual SbVec2s getSize () const =0
virtual const SbVec2i32getSize_i32 () const =0
virtual void setPixelFormat (int format)
virtual int getPixelFormat ()
virtual void setRenderToTexture (SbBool enable, TextureFormat format=TEXTURE_RGB, TextureTarget target=TEXTURE_2D, SbBool autoMipmap=FALSE, SbBool hasDepth=FALSE)=0
virtual SbBool bindToTexture (SbBool bindDepth=FALSE, GLuint texObj=-1)=0
virtual SbBool releaseTexImage (SbBool bindDepth=FALSE)=0
virtual SbBool selectCubeMapFace (CubeMapTextureFace face)=0
virtual SoGLGraphicConfigTemplategetGraphicConfigTemplate ()
virtual void setGraphicConfigTemplate (SoGLGraphicConfigTemplate *gTemplate)
virtual SbBool isPBuffer ()

Static Public Member Functions

static SbBool isAvailable (SbGlContextHelper::Display display=NULL)
static SoGLRenderToBuffercreateInstance (bool forcePbuffer, SbGlContextHelper::Display display=NULL)

Detailed Description

VSG extension Render to buffer.

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

Deprecated:

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

Member Enumeration Documentation

Face id of the cube map.

Enumerator:
TEXTURE_CUBE_MAP_POSITIVE_X 
TEXTURE_CUBE_MAP_POSITIVE_Y 
TEXTURE_CUBE_MAP_POSITIVE_Z 
TEXTURE_CUBE_MAP_NEGATIVE_X 
TEXTURE_CUBE_MAP_NEGATIVE_Y 
TEXTURE_CUBE_MAP_NEGATIVE_Z 

Texture format.

TEXTURE_RGB by default.

Enumerator:
TEXTURE_RGB 
TEXTURE_RGBA 
TEXTURE_DEPTH 
TEXTURE_DEPTH16 
TEXTURE_DEPTH_RGBA 
TEXTURE_RGB_FLOAT16 
TEXTURE_RGBA_FLOAT16 
TEXTURE_RGB_FLOAT32 
TEXTURE_RGBA_FLOAT32 
TEXTURE_STENCIL_INDEX8 
TEXTURE_STENCIL_INDEX 
TEXTURE_DEPTH_STENCIL 
TEXTURE_UNKNOW 

OpenGL target.

TEXTURE_2D by default.

Enumerator:
TEXTURE_1D 
TEXTURE_2D 
TEXTURE_3D 
TEXTURE_CUBE_MAP 
TEXTURE_RECTANGLE 

Constructor & Destructor Documentation

virtual SoGLRenderToBuffer::~SoGLRenderToBuffer (  )  [virtual]

Destructor.


Member Function Documentation

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

Binds the render buffer to a texture object.

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

Implemented in SoFrameBufferObject, and SoPBuffer.

virtual SbBool SoGLRenderToBuffer::create ( SbVec2i32  size  )  [pure virtual]

Creates a Pbuffer with the specified size.

For sizes greater than 32767. Returns TRUE if successful

Implemented in SoFrameBufferObject, and SoPBuffer.

virtual SbBool SoGLRenderToBuffer::create ( SbVec2s  size  )  [pure virtual]

Creates a Pbuffer with the specified size.

Limited to 32767. Returns TRUE if successful

Implemented in SoFrameBufferObject, and SoPBuffer.

static SoGLRenderToBuffer* SoGLRenderToBuffer::createInstance ( bool  forcePbuffer,
SbGlContextHelper::Display  display = NULL 
) [static]

Create a framebuffer if available otherwise use pbuffer.

forcePbuffer is true don't use framebuffer. Create a pbuffer if SO_FBO_ENABLE is set to 0 whatever FBO availability.

virtual void SoGLRenderToBuffer::disable (  )  [pure virtual]

Disable render to buffer Returns TRUE if successful.

Implemented in SoFrameBufferObject, and SoPBuffer.

virtual SoGLGraphicConfigTemplate* SoGLRenderToBuffer::getGraphicConfigTemplate (  )  [inline, virtual]

Gets the current graphics configuration template.

Reimplemented in SoFrameBufferObject, and SoPBuffer.

virtual int SoGLRenderToBuffer::getPixelFormat (  )  [inline, virtual]

Returns the current pixel format.

This method allow an application to query a pixel format that has extended attributes that can't be specified in a PFD struct.

Reimplemented in SoFrameBufferObject, and SoPBuffer.

virtual SbVec2s SoGLRenderToBuffer::getSize (  )  const [pure virtual]

Gets current size as an SbVec2s.

Implemented in SoFrameBufferObject, and SoPBuffer.

virtual const SbVec2i32& SoGLRenderToBuffer::getSize_i32 (  )  const [pure virtual]

Gets current size as an SbVec2i32.

Implemented in SoFrameBufferObject, and SoPBuffer.

static SbBool SoGLRenderToBuffer::isAvailable ( SbGlContextHelper::Display  display = NULL  )  [static]

Queries if Pbuffers are available on this system (on the specified display connection if this is a UNIX system).

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

  • On UNIX systems the parameter is a "Display *".
  • On Win32 systems the parameter is ignored.

Reimplemented in SoPBuffer.

virtual SbBool SoGLRenderToBuffer::isPBuffer (  )  [inline, virtual]

Return TRUE if the render buffer is a pbuffer.

virtual SbBool SoGLRenderToBuffer::makeCurrent (  )  [pure virtual]

Enable render to buffer for OpenGL rendering.

Returns TRUE if successful

Implemented in SoFrameBufferObject, and SoPBuffer.

virtual SbBool SoGLRenderToBuffer::releaseTexImage ( SbBool  bindDepth = FALSE  )  [pure virtual]

Releases the Pbuffer from the current texture object.

Required before rendering again. If bindDepth is set to TRUE, releases the depth buffer instead of the color buffer

Implemented in SoFrameBufferObject, and SoPBuffer.

virtual SbBool SoGLRenderToBuffer::resize ( const SbVec2i32 size  )  [pure virtual]

Resizes Pbuffer.

For sizes greater than 32767. Returns TRUE if successful

Implemented in SoFrameBufferObject, and SoPBuffer.

virtual SbBool SoGLRenderToBuffer::resize ( const SbVec2s size  )  [pure virtual]

Resizes Pbuffer.

Limited to 32767. Returns TRUE if successful

Implemented in SoFrameBufferObject, and SoPBuffer.

virtual SbBool SoGLRenderToBuffer::selectCubeMapFace ( CubeMapTextureFace  face  )  [pure virtual]

Selects the face to be used when the rendering target is a cube map.

Implemented in SoFrameBufferObject, and SoPBuffer.

virtual void SoGLRenderToBuffer::setContextForSharing ( SoGLContext  )  [inline, virtual]

++ This has effect only when using PBuffer.

++

Sets OpenGL render context for display list sharing. Must be set before calling the create() method. There is no guarantee that sharing will be allowed.

Reimplemented in SoFrameBufferObject.

virtual void SoGLRenderToBuffer::setDisplayConnection ( SbGlContextHelper::Display   )  [inline, virtual]

++ This has effect only when using PBuffer.

++

Sets X display connection to use for this Pbuffer. Must be set before calling the create() method.

On UNIX systems the parameter is a "Display *". On Win32 systems this method is ignored.

Reimplemented in SoFrameBufferObject.

virtual void SoGLRenderToBuffer::setGraphicConfigTemplate ( SoGLGraphicConfigTemplate gTemplate  )  [inline, virtual]

Sets a new graphics configuration template.

Reimplemented in SoFrameBufferObject, and SoPBuffer.

virtual void SoGLRenderToBuffer::setPixelFormat ( int  format  )  [inline, virtual]

Sets the current pixel format.

This method allows an application to set a pixel format that has extended attributes that can't be specified in a PFD struct. The specified format must support OpenGL and drawing to a pbuffer.

Reimplemented in SoFrameBufferObject, and SoPBuffer.

virtual void SoGLRenderToBuffer::setRenderToTexture ( SbBool  enable,
TextureFormat  format = TEXTURE_RGB,
TextureTarget  target = TEXTURE_2D,
SbBool  autoMipmap = FALSE,
SbBool  hasDepth = FALSE 
) [pure virtual]

Specifies settings for the Pbuffer creation.

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

void SoGLRenderToBuffer::shareCurrentContext (  )  [inline]

++ This has effect only when using PBuffer.

++ Share OpenGL objects with the current context.

Reimplemented in SoPBuffer.


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

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/