00001 #ifndef GLFramebuffer_H 00002 #define GLFramebuffer_H 00003 00004 #include "glew/glew.h" 00005 #include "GLTexture.h" 00006 00007 #include <vector> 00008 00009 using namespace std; 00010 00011 class GLFramebuffer 00012 { 00013 public: 00014 GLFramebuffer(); 00015 ~GLFramebuffer(); 00016 GLuint getBuffer(); 00017 GLuint getWidth(); 00018 GLuint getHeight(); 00019 GLTexture* createTexture(); 00020 GLTexture* getTexture(int index = 0); 00021 void create(GLuint width, GLuint height); 00022 void free(); 00023 00024 private: 00025 GLuint buffer; 00026 GLuint width, height; 00027 vector<GLTexture> textures; 00028 }; 00029 00030 #endif // GLFramebuffer_H