GLRenderTexture< TEXTURE_TYPE > Class Template Reference
Detailed Description
template<GLenum TEXTURE_TYPE>
class cy::GLRenderTexture< TEXTURE_TYPE >
class cy::GLRenderTexture< TEXTURE_TYPE >
OpenGL render color buffer.
This class provides a convenient interface for texture rendering in OpenGL with a color texture buffer.
#include <cyGL.h>
Inheritance diagram for GLRenderTexture< TEXTURE_TYPE >:Public Member Functions | |
Render Buffer Creation and Initialization | |
| bool | Initialize (bool useDepthBuffer) |
| Generates the render buffer. Returns true if the render buffer is ready. | |
| bool | Initialize (bool useDepthBuffer, int numChannels, GLsizei width, GLsizei height, GL::Type type=GL::TYPE_UBYTE) |
| Generates the render buffer and sets its size. Returns true if the render buffer is ready and complete. | |
| bool | Resize (int numChannels, GLsizei width, GLsizei height, GL::Type type=GL::TYPE_UBYTE) |
| Initializes or changes the size of the render buffer. Returns true if the buffer is complete. | |
General Methods | |
| void | Delete () |
| Deletes the render buffer. | |
| GLuint | GetID () const |
| Returns the frame buffer ID. | |
| bool | IsNull () const |
| Returns true if the render buffer is not initialized, i.e. the render buffer id is invalid. | |
| void | Bind () const |
| Binds the frame buffer for rendering and adjusts the viewport accordingly. | |
| void | Unbind () const |
| Binds the frame buffer that was used before this frame buffer was bound and reverts the viewport. | |
| bool | IsReady () const |
| Returns true if the frame buffer is ready. This method can be called after initialization. | |
| bool | IsComplete () const |
| Returns true if the render buffer is complete. | |
Protected Attributes | |
| GLuint | framebufferID |
| The frame-buffer ID. | |
| GLuint | depthbufferID |
| The depth-buffer ID. | |
| GLTexture2< TEXTURE_TYPE > | texture |
| The buffer texture. | |
| GLsizei | bufferWidth |
| The width of the frame buffer. | |
| GLsizei | bufferHeight |
| The height of the frame buffer. | |
| GLint | prevBufferID |
| Temporary storage for previous frame-buffer used before binding this buffer. | |
| GLint | prevViewport [4] |
| Temporary storage for the size and position of the previous frame-buffer used before binding this buffer. | |