INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
hydroglu::GLFrameBuffer Class ReferenceClass that wraps an OpenGL framebuffer object in a simplistic manner. More...
Detailed DescriptionClass that wraps an OpenGL framebuffer object in a simplistic manner. A framebuffer is a way of attaching what is normally a read only buffer such as a texture to something that can be written to (drawn on in the case of textures). Commonly used as the destination for GPGPU computations. Multiple textures can be attached as output destionations for a framebuffer such that when the framebuffer is drawn to all of the attached textures are available in a glsl shader. This way, multiple computations that need to be stored seperately can be done in a single shader in a single pass. Reading from a GLFrameBuffer back to memory can be done through the GLTexture download method. Typical usage #include <hydroglu/hydroglu.h> //... other code // void initializeGL() { //setup opengl state //... //end setup opengl state fftTexture_ = new GLTexture("FFT Output Buffer", 640, 480); frameBufferPtr_ = new GLFrameBuffer("FFT Output"); frameBufferPtr_->attachTexture(fftTexture_, GL_COLOR_ATTACHMENT0_EXT); } void paintGL() { fftprogram_->enable(); frameBufferPtr_->bind(); //clear the framebuffer glClear(GL_COLOR_BUFFER_BIT); //bind input texture fftinput_->bind(); glBegin(GL_QUADS); //draw quad glEnd(); fftinput_->unbind(); frameBufferPtr_->unbind(); fftprogram_->disable(); } Constructor & Destructor Documentation
GLFramebuffer constructor.
Member Function Documentation
obtain the texture attached to a point or an empty GLTexturePtr
The documentation for this class was generated from the following files:
|
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)