Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Attributes
OpenGl_FrameBuffer Class Reference

#include <OpenGl_FrameBuffer.hxx>

Public Member Functions

 OpenGl_FrameBuffer (GLint theTextureFormat=GL_RGBA8)
virtual ~OpenGl_FrameBuffer ()
GLsizei GetSizeX () const
 Texture width.
GLsizei GetSizeY () const
 Texture height.
GLsizei GetVPSizeX () const
 Viewport width.
GLsizei GetVPSizeY () const
 Viewport height.
Standard_Boolean IsValid () const
 Returns true if current object was initialized.
Standard_Boolean Init (const Handle< OpenGl_Context > &theGlContext, GLsizei theViewportSizeX, GLsizei theViewportSizeY, GLboolean toForcePowerOfTwo=GL_FALSE)
 Notice! Obsolete hardware (GeForce FX etc) doesn't support rectangular textures! There are 3 possible results if you are trying to create non power-of-two FBO on these cards: 1) FBO creation will fail, current implementation will try to generate compatible FBO; 2) FBO rendering will be done in software mode (ForceWare 'hack'); 3) FBO rendering will be incorrect (some obsolete Catalyst drivers).
void Release (const Handle< OpenGl_Context > &theGlContext)
 Release GL objects.
void SetupViewport ()
 Setup viewport to render into FBO.
void ChangeViewport (const GLsizei theVPSizeX, const GLsizei theVPSizeY)
 Override viewport settings.
void BindBuffer (const Handle< OpenGl_Context > &theGlContext)
 Bind frame buffer (to render into the texture).
void UnbindBuffer (const Handle< OpenGl_Context > &theGlContext)
 Unbind frame buffer.
void BindTexture ()
 Bind the texture.
void UnbindTexture ()
 Unbind the texture.

Static Public Attributes

static const GLuint NO_TEXTURE = 0
 Helpful constants.
static const GLuint NO_FRAMEBUFFER = 0
static const GLuint NO_RENDERBUFFER = 0

Constructor & Destructor Documentation

OpenGl_FrameBuffer::OpenGl_FrameBuffer ( GLint  theTextureFormat = GL_RGBA8)
virtual OpenGl_FrameBuffer::~OpenGl_FrameBuffer ( ) [inline, virtual]

Member Function Documentation

void OpenGl_FrameBuffer::ChangeViewport ( const GLsizei  theVPSizeX,
const GLsizei  theVPSizeY 
) [inline]
GLsizei OpenGl_FrameBuffer::GetSizeX ( ) const [inline]
GLsizei OpenGl_FrameBuffer::GetSizeY ( ) const [inline]
GLsizei OpenGl_FrameBuffer::GetVPSizeX ( ) const [inline]
GLsizei OpenGl_FrameBuffer::GetVPSizeY ( ) const [inline]
Standard_Boolean OpenGl_FrameBuffer::Init ( const Handle< OpenGl_Context > &  theGlContext,
GLsizei  theViewportSizeX,
GLsizei  theViewportSizeY,
GLboolean  toForcePowerOfTwo = GL_FALSE 
)

Field Documentation


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