Vis 2 Demo  1.0
Technical illustration type real-time rendering of geometry
 All Classes Namespaces Files Functions Variables Typedefs Macros
FramebufferObject.h
Go to the documentation of this file.
1 #ifndef __FRAME_BUFFER_OBJECT_H__
2 #define __FRAME_BUFFER_OBJECT_H__
3 
4 #include <glew.h>
5 #include <iostream>
6 #include "Texture.h"
7 
8 #define VIS2_FBO_SETUP_SUCCESS 0
9 #define VIS2_FBO_SETUP_FAIL -1
10 
11 namespace vis2
12 {
14 
19  {
20  public:
22 
28  FramebufferObject(const unsigned int _vp_width, const unsigned int _vp_height, const bool _color_only);
29 
31 
35 
37 
40  inline unsigned int getFBOStatus() const { return fbo_status; }
41 
43 
49  void bindFramebufferObject(const float _r, const float _g, const float _b, const float _a);
50 
52 
57 
62 
63  private:
66 
67  bool color_only;
68 
69  GLuint fbo_handle;
71  unsigned int fbo_status;
72  unsigned int fbo_width;
73  unsigned int fbo_height;
78 
79  };
80 }
81 
82 
83 
84 #endif