CPPGPGPU Library - Reference (Doxygen)

Main Page | General Use | Reference | Examples Info | Get/Download CPPGPGPU | SF.net Page

RFBuffer Class Reference

Render / Frame Buffer. More...

#include <OGLParts.h>

List of all members.

Public Member Functions

 RFBuffer ()
 ~RFBuffer ()
bool Setup (bool bUseDepthBuffer=true)
 Setup the RFBuffer, this should only get called once ever, on init.
bool ConfigureAndStart (int iWidth, int iHeight, int iTextures, Texture *TexturesToAttach, bool bClear=false)
 Startup the framebuffer, this redirects the output to the selected textures.
bool End (int iRegVPX, int iRegVPY)
int GetWidth ()
 Get the width of the selcted framebuffer.
int GetHeight ()
 Get the height of the selcted framebuffer.
TextureType GetTT ()
 Get the Texture Type of the selcted framebuffer.

Private Attributes

bool m_bUseDepthBuffer
int mWidth
int mHeight
TextureType mtt
GLuint iRenderbuffer
GLuint iOutputBuffer


Detailed Description

Render / Frame Buffer.

This object allows easy use of setting up the framebuffer and or renderbuffer. The general idea is that you can set one of these up once for each type of operation you plan to do (to have a depth buffer or not.) Once configured, you tell it to start, perform drawing, and tell it to end. Anything you did during the drawing phase will be written to TexturesToAttach. In order to access more than the first buffer, you must use a shader and output the data to different buffers. In general, most systems allow 4-8 textures to be attached.

Definition at line 194 of file OGLParts.h.


Constructor & Destructor Documentation

RFBuffer::RFBuffer (  ) 

Definition at line 524 of file OGLParts.cpp.

RFBuffer::~RFBuffer (  ) 

Definition at line 531 of file OGLParts.cpp.


Member Function Documentation

bool RFBuffer::Setup ( bool  bUseDepthBuffer = true  ) 

Setup the RFBuffer, this should only get called once ever, on init.

Definition at line 540 of file OGLParts.cpp.

bool RFBuffer::ConfigureAndStart ( int  iWidth,
int  iHeight,
int  iTextures,
Texture TexturesToAttach,
bool  bClear = false 
)

Startup the framebuffer, this redirects the output to the selected textures.

Definition at line 549 of file OGLParts.cpp.

bool RFBuffer::End ( int  iRegVPX,
int  iRegVPY 
)

Redirect the drawing back to the regular framebuffer. Note, you should use GLUT.miWidth and GLUT.miHeight for the parameters here.

Definition at line 610 of file OGLParts.cpp.

int RFBuffer::GetWidth (  )  [inline]

Get the width of the selcted framebuffer.

Definition at line 211 of file OGLParts.h.

int RFBuffer::GetHeight (  )  [inline]

Get the height of the selcted framebuffer.

Definition at line 214 of file OGLParts.h.

TextureType RFBuffer::GetTT (  )  [inline]

Get the Texture Type of the selcted framebuffer.

Definition at line 217 of file OGLParts.h.


Member Data Documentation

bool RFBuffer::m_bUseDepthBuffer [private]

Definition at line 219 of file OGLParts.h.

int RFBuffer::mWidth [private]

Definition at line 220 of file OGLParts.h.

int RFBuffer::mHeight [private]

Definition at line 220 of file OGLParts.h.

TextureType RFBuffer::mtt [private]

Definition at line 221 of file OGLParts.h.

GLuint RFBuffer::iRenderbuffer [private]

Definition at line 223 of file OGLParts.h.

GLuint RFBuffer::iOutputBuffer [private]

Definition at line 224 of file OGLParts.h.


The documentation for this class was generated from the following files:
© 2005-2007 Charles Lohr, Joshua Allen, David Chapman, Andrew Lohr. All material including documentation under the MIT/X11 license.