KGLLib
Public Member Functions | Static Public Member Functions | Protected Member Functions
KGLLib::RenderTarget Class Reference

List of all members.

Public Member Functions

 RenderTarget (Texture *color)
 RenderTarget (int width, int height, bool hasDepth=false, GLint textureFormat=GL_RGBA)
virtual ~RenderTarget ()
bool enable ()
bool disable ()
Texturetexture () const
int width () const
int height () const
QSize size () const
bool isValid () const

Static Public Member Functions

static bool isSupported ()

Protected Member Functions

TexturecreateColorTexture (int w, int h, GLint textureFormat=GL_RGBA)
TexturecreateDepthTexture (int w, int h)
GLuint createDepthBuffer (int w, int h)
void attachColorTexture (Texture *tex)
void attachDepthTexture (Texture *tex)
void attachDepthBuffer (GLuint buffer)
bool startInit ()
void endInit ()

Constructor & Destructor Documentation

KGLLib::RenderTarget::RenderTarget ( Texture color) [explicit]

Creates RenderTarget object for rendering onto color. color must be a valid RGBA texture.

KGLLib::RenderTarget::RenderTarget ( int  width,
int  height,
bool  hasDepth = false,
GLint  textureFormat = GL_RGBA 
)

Creates a render target of size width x height. Internal color texture is created and can be accessed using texture(). The internal format of the color texture can be specified using textureFormat parameter. If depth is true then internal depth renderbuffer is created but you will have no access to it.

KGLLib::RenderTarget::~RenderTarget ( ) [virtual]

Creates RenderTarget object for rendering onto color and depth. If either of them is null then internal renderbuffer is created for it, but you won't have access to it.


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