GLFX::IFramebuffer Struct Reference

#include <glfx.h>

Inheritance diagram for GLFX::IFramebuffer:

GLFX::IObject List of all members.

Detailed Description

Multiple textures may be attached and share a single depth and stencil buffer. Usage sample:
    fb = fxMgr->CreateFramebuffer(512, 512, 24, 0);
    fb->BeginCapture();
    fb->AttachTexture(0, GL_TEXTURE_2D, texture, 0, 0);
    fb->IsValid();
    ... render to texture ...
    fb->EndCapture();
    glBindTexture(GL_TEXTURE_2D, texture);
    ... render using rendered texture...
    


Public Member Functions

virtual bool BeginCapture ()=0
virtual void EndCapture ()=0
virtual bool AttachTexture (long attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)=0
virtual bool IsValid ()=0
virtual void SetDrawBuffer (long attachment)=0


Member Function Documentation

virtual bool GLFX::IFramebuffer::BeginCapture (  )  [pure virtual]

Begins rendering to this framebuffer.

Returns:
true if successful

virtual void GLFX::IFramebuffer::EndCapture (  )  [pure virtual]

Ends rendering to the framebuffer.

virtual bool GLFX::IFramebuffer::AttachTexture ( long  attachment,
GLenum  textarget,
GLuint  texture,
GLint  level,
GLint  zoffset 
) [pure virtual]

Attaches OpenGL texture to the framebuffer.

Parameters:
attachment attachment point number
textarget texture target, one of GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
texture OpenGL texture id
level mipmap level
zoffset z-offset if 3d texture
Returns:
true if successful

virtual bool GLFX::IFramebuffer::IsValid (  )  [pure virtual]

Tests if framebuffer is complete and can be rendered to.

Returns:
true if framebuffer is complete

virtual void GLFX::IFramebuffer::SetDrawBuffer ( long  attachment  )  [pure virtual]

Sets a attached texture as current draw buffer.

Parameters:
attachment attachment number


The documentation for this struct was generated from the following file:
SourceForge.net Logo