DeferredRenderer 1.0

FrameBufferObject.h

Go to the documentation of this file.
00001 #ifndef FRAMEBUFFEROBJECT_H
00002 #define FRAMEBUFFEROBJECT_H
00003 
00004 #include "string"
00005 #include "vector"
00006 #include "ngl/Types.h"
00007 
00015 class FrameBufferObject
00016 {
00017 public:
00018 
00020     FrameBufferObject(){}
00021 
00026     FrameBufferObject(unsigned int _width, unsigned int _height);
00027 
00029     ~FrameBufferObject();
00030     
00032     void bind();
00033     
00035     void unbind();
00036     
00038     void create(GLuint _textureId);
00039     
00041     void checkStatus();
00042     
00045     inline unsigned int getWidth(){return m_width;}
00046 
00049     inline unsigned int getHeight(){return m_height;}
00050 
00052     void activateAllTargets();
00053 
00057     void bindTextureSlot(GLuint _slot, GLuint _id);
00058 
00059     void bindDepthTexture( GLuint textureId );
00060 
00063     void activateTarget(GLuint _id);
00064 private:
00065 
00067     GLuint m_width;
00068     
00070     GLuint m_height;
00071     
00073     GLuint m_FBOid;
00074 
00076     GLuint m_RBid;
00077 };
00078 
00079 #endif // FRAMEBUFFEROBJECT_H
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines