/************************************************ ** framebufferObject.cpp ** ** --------------------- ** ** ** ** This is the frame-work for general purpose ** ** initialization of a framebuffer object, ** ** as specified in the OpenGL extension: ** ** GL_EXT_FRAMEBUFFER_OBJECT ** ** ** ** Since this is an OpenGL extension, not WGL, ** ** it should be much more portable (and ** ** supposedly) faster than p-buffers and ** ** render-to-texture. ** ** ** ** Chris Wyman (4/27/2005) ** ************************************************/ #include #include #include "framebufferObject.h" FrameBuffer::FrameBuffer( char *name ) { glGetIntegerv( GL_MAX_COLOR_ATTACHMENTS_EXT, &maxColorBuffers ); colorIDs = new GLuint[maxColorBuffers]; depthID = 0; stencilID = 0; for (int i=0; i