SimpleGL  1.1.0
A framework for platform independent rendering
framebuffer_object.hpp
Go to the documentation of this file.
1 
8 #ifndef FRAMEBUFFER_OBJECT_HPP
9 #define FRAMEBUFFER_OBJECT_HPP
10 
11 #include <SimpleGL_gl/SimpleGL_gl_Export.h>
12 
13 #include <GL/glew.h>
14 
15 #include "texture_object.hpp"
16 
17 namespace sgl {
18 
24  class SIMPLEGL_GL_EXPORT Renderbuffer {
25 
26  private:
28  static Renderbuffer* current;
29 
31  GLuint handle;
32 
33  public:
35  Renderbuffer(void);
36 
38  ~Renderbuffer(void);
39 
45  GLuint getHandle();
46 
48  void bind();
49 
56  void storage(int width, int height);
57  };
58 
64  class SIMPLEGL_GL_EXPORT FramebufferGL {
65 
66  private:
68  static FramebufferGL* current;
69 
71  GLuint handle;
72 
73  public:
75  FramebufferGL(void);
76 
78  ~FramebufferGL(void);
79 
85  GLuint getHandle();
86 
88  void bind();
89 
95  void setTexture(Texture* texture);
96 
102  void setRenderbuffer(Renderbuffer* buffer);
103  };
104 }
105 
106 #endif /* FRAMEBUFFER_OBJECT_HPP */
Generic namespace for the SimpleGL framework.
Definition: application.hpp:18
This class wraps an OpenGL texture object.
This class wraps an OpenGL framebuffer object.
This class wraps an OpenGL renderbuffer object.