Open CASCADE Technology
6.5.4
|
#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 |
OpenGl_FrameBuffer::OpenGl_FrameBuffer | ( | GLint | theTextureFormat = GL_RGBA8 | ) |
virtual OpenGl_FrameBuffer::~OpenGl_FrameBuffer | ( | ) | [inline, virtual] |
void OpenGl_FrameBuffer::BindBuffer | ( | const Handle< OpenGl_Context > & | theGlContext | ) | [inline] |
void OpenGl_FrameBuffer::BindTexture | ( | ) | [inline] |
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 |
||
) |
Standard_Boolean OpenGl_FrameBuffer::IsValid | ( | ) | const [inline] |
void OpenGl_FrameBuffer::Release | ( | const Handle< OpenGl_Context > & | theGlContext | ) |
void OpenGl_FrameBuffer::SetupViewport | ( | ) | [inline] |
void OpenGl_FrameBuffer::UnbindBuffer | ( | const Handle< OpenGl_Context > & | theGlContext | ) | [inline] |
void OpenGl_FrameBuffer::UnbindTexture | ( | ) | [inline] |
const GLuint OpenGl_FrameBuffer::NO_FRAMEBUFFER = 0 [static] |
const GLuint OpenGl_FrameBuffer::NO_RENDERBUFFER = 0 [static] |
const GLuint OpenGl_FrameBuffer::NO_TEXTURE = 0 [static] |