Propane::FBOTextureRenderTarget Class Reference

An implementation of the TextureRenderTarget that uses FBO (Frame Buffer Objects). Thanks to Rob. More...

#include <PropaneFramebuffer.h>

Inheritance diagram for Propane::FBOTextureRenderTarget:

Propane::TextureRenderTarget List of all members.

Public Member Functions

 FBOTextureRenderTarget (int w, int h)
virtual void begin ()
virtual void end ()
virtual ~FBOTextureRenderTarget ()
virtual GLuint * getRenderTexture ()
virtual void bindTexture ()
 Call this method to just bind the containing texture directly to the current texture context -- supports texture rectangle and non-standard textures too.
virtual void unbindTexture ()
 Call this method to unbind the containing texture.

Protected Member Functions

virtual void createTexture (int w, int h)
 Create the proper RGBA + depth texture for this use.

Protected Attributes

GLuint fboHandle
 The handle to the actual framebuffer object.
GLuint depthBufferHandle
 The handle to the framebuffer's depth buffer object.
GLuint tex
 Internal texture reference.

Detailed Description

An implementation of the TextureRenderTarget that uses FBO (Frame Buffer Objects). Thanks to Rob.


Constructor & Destructor Documentation

Propane::FBOTextureRenderTarget::FBOTextureRenderTarget int  w,
int  h
[inline]
 

Create a texture, renderbuffer and depthbuffer, and start rendering to it.

Instead of calling this directly, use getNewTextureRenderTarget to get the specific texture rendering target for your hardware.

Any errors will be emitted to stderr.

Parameters:
w The width of the window, in pixels
h The height of the window, in pixels

virtual Propane::FBOTextureRenderTarget::~FBOTextureRenderTarget  )  [inline, virtual]
 

Basic destructor. MAKE SURE you have called end() before destructing, or your render target may disappear and you'll be left with an invisible window.


Member Function Documentation

virtual void Propane::FBOTextureRenderTarget::begin  )  [inline, virtual]
 

Begin rendering to texture; every GL call after this one will render itself into the raw texture handle that we have retained.

Implements Propane::TextureRenderTarget.

virtual void Propane::FBOTextureRenderTarget::end  )  [inline, virtual]
 

Stop rendering to texture; after this call completes the texture should be updated with whatever calls we made since begin().

Implements Propane::TextureRenderTarget.

virtual GLuint* Propane::FBOTextureRenderTarget::getRenderTexture  )  [inline, virtual]
 

Get the raw texture for later use

Returns:
A pointer to the raw texture, or NULL if the render failed.

Implements Propane::TextureRenderTarget.


The documentation for this class was generated from the following file:
Generated on Sun Jan 14 16:49:12 2007 for Propane Injector by  doxygen 1.4.6