FBO.hh

00001 //=============================================================================
00002 //
00003 //  CLASS FBO
00004 //
00005 // Author:  Dominik Sibbing <sibbing@cs.rwth-aachen.de>
00006 //
00007 // Version: $Revision: 1$
00008 // Date:    $Date: 2008$
00009 //
00010 //=============================================================================
00011 
00012 
00013 #ifndef ACG_FBO_HH
00014 #define ACG_FBO_HH
00015 
00016 
00017 //== INCLUDES =================================================================
00018 
00019 #include <iostream>
00020 #include <stdlib.h>
00021 
00022 #include <ACG/GL/gl.hh>
00023 
00024 //== FORWARDDECLARATIONS ======================================================
00025 
00026 //== NAMESPACES ===============================================================
00027 
00028 namespace ACG {
00029 
00030 //== CLASS DEFINITION =========================================================
00031 
00032 
00039 class FBO
00040 {
00041 public:
00042    
00044   FBO() {}
00045   
00047   ~FBO();
00048   
00050   void init();
00051   
00053   void attachTexture2D( GLenum _attachment, GLuint _texture );
00054 
00056   void addDepthBuffer( GLuint _width, GLuint _height );
00057   
00059   void addStencilBuffer( GLuint _width, GLuint _height );
00060   
00062   bool bind();
00063   
00065   void unbind();
00066   
00068   bool checkFramebufferStatus();
00069 
00070 private:
00071 
00073   GLuint fbo_;
00074 
00076   GLuint depthbuffer_;
00077   
00079   GLuint stencilbuffer_;
00080   
00081 
00082 };
00083 
00084 
00085 //=============================================================================
00086 } // namespace ACG
00087 //=============================================================================
00088 #endif // ACG_FBO_HH defined
00089 //=============================================================================
00090 

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .