SoPBuffer Class Reference
[General]

VSG extension Creates an OpenGL Pbuffer. More...

#include <Inventor/SoPBuffer.h>

Inheritance diagram for SoPBuffer:
SoGLRenderToBuffer

List of all members.

Public Member Functions

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

Static Public Member Functions

static SbBool isAvailable (SbGlContextHelper::Display display=NULL)

Detailed Description

VSG extension Creates an OpenGL Pbuffer.

This class creates an OpenGL Pbuffer object which may be used for accelerated off-screen rendering. Unlike a pixmap or offscreen bitmap, a Pbuffer is allocated in frame buffer memory and can be rendered to directly by the graphics hardware.

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

For most applications, using the SoOffscreenRenderer class will be more convenient. SoOffscreenRenderer uses Pbuffers automatically.

Pbuffers are only available if the graphics hardware supports OpenGL 1.2 or the OpenGL Pbuffer extension. On UNIX this extension is named "GLX_pbuffer" or "GLX_SGIX_pbuffer". On Windows this extension is named "WGL_ARB_pbuffer" or "WGL_EXT_pbuffer".

SEE ALSO

SoOffscreenRenderer

Deprecated:

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

Constructor & Destructor Documentation

SoPBuffer::SoPBuffer (  ) 

Constructor.

Creates an object of this class but does *not* create a Pbuffer. Use the create() method to attempt creation of a Pbuffer.

SoPBuffer::~SoPBuffer (  ) 

Destructor.


Member Function Documentation

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

Binds the Pbuffer buffer to a texture object (The current one, texObj is not used) If bindDepth is set to TRUE, binds the depth buffer instead of the color buffer.

Implements SoGLRenderToBuffer.

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

Creates a Pbuffer with the specified size.

For sizes greater than 32767. Returns TRUE if successful

Implements SoGLRenderToBuffer.

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

Creates a Pbuffer with the specified size.

Limited to 32767. Returns TRUE if successful

Implements SoGLRenderToBuffer.

void SoPBuffer::disable (  )  [virtual]

Disable render to buffer Returns TRUE if successful.

Implements SoGLRenderToBuffer.

SoGLGraphicConfigTemplate* SoPBuffer::getGraphicConfigTemplate (  )  [virtual]

Gets the current graphics configuration template.

Reimplemented from SoGLRenderToBuffer.

int SoPBuffer::getPixelFormat (  )  [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 from SoGLRenderToBuffer.

SbVec2s SoPBuffer::getSize (  )  const [virtual]

Gets current size as an SbVec2s.

Implements SoGLRenderToBuffer.

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

Gets current size as an SbVec2i32.

Implements SoGLRenderToBuffer.

static SbBool SoPBuffer::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 from SoGLRenderToBuffer.

SbBool SoPBuffer::makeCurrent (  )  [virtual]

Makes Pbuffer current for OpenGL rendering.

Returns TRUE if successful

Implements SoGLRenderToBuffer.

SbBool SoPBuffer::releaseTexImage ( SbBool  bindDepth = FALSE  )  [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

Implements SoGLRenderToBuffer.

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

Resizes Pbuffer.

For sizes greater than 32767. Returns TRUE if successful

Implements SoGLRenderToBuffer.

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

Resizes Pbuffer.

Limited to 32767. Returns TRUE if successful

Implements SoGLRenderToBuffer.

SbBool SoPBuffer::selectCubeMapFace ( CubeMapTextureFace  face  )  [virtual]

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

Implements SoGLRenderToBuffer.

void SoPBuffer::setGraphicConfigTemplate ( SoGLGraphicConfigTemplate gTemplate  )  [virtual]

Sets a new graphics configuration template.

Reimplemented from SoGLRenderToBuffer.

void SoPBuffer::setPixelFormat ( int  format  )  [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 from SoGLRenderToBuffer.

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

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 SoPBuffer::shareCurrentContext (  ) 

Share OpenGL object with the current context.

Reimplemented from SoGLRenderToBuffer.


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/