Create an OpenGL FrameBuffer More...
#include <Inventor/SoFrameBufferObject.h>
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.SoPBuffer, SoOffscreenRenderer
Attachement.
SoFrameBufferObject::SoFrameBufferObject | ( | ) |
Constructor.
Creates an object of this class but does *not* create the FrameBuffer until resize is called.
SoFrameBufferObject::~SoFrameBufferObject | ( | ) |
Destructor.
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.
Create a framebuffer with the specified size.
For sizes greater than 32767. Returns TRUE if successful
Implements SoGLRenderToBuffer.
Create a framebuffer with the specified size.
Limited to 32767. Returns TRUE if successful
Implements SoGLRenderToBuffer.
SoDEPRECATED void SoFrameBufferObject::disable | ( | ) | [virtual] |
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] |
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] |
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.
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).
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] |
Implements SoGLRenderToBuffer.
Implements SoGLRenderToBuffer.
Resize the FrameBuffer.
Implements SoGLRenderToBuffer.
SoDEPRECATED SbBool SoFrameBufferObject::selectCubeMapFace | ( | CubeMapTextureFace | face | ) | [virtual] |
Implements SoGLRenderToBuffer.
SoDEPRECATED void SoFrameBufferObject::setContextForSharing | ( | SoGLContext * | context | ) | [inline, virtual] |
Reimplemented from SoGLRenderToBuffer.
SoDEPRECATED void SoFrameBufferObject::setDisplayConnection | ( | SbGlContextHelper::Display | ) | [inline, virtual] |
Reimplemented from SoGLRenderToBuffer.
SoDEPRECATED void SoFrameBufferObject::setGraphicConfigTemplate | ( | SoGLGraphicConfigTemplate * | gTemplate | ) | [virtual] |
Reimplemented from SoGLRenderToBuffer.
SoDEPRECATED void SoFrameBufferObject::setPixelFormat | ( | int | format | ) | [virtual] |
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.