Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
OffscreenRendering.hh
1 #ifndef __OFFSCREENRENDERING_HH__
2 #define __OFFSCREENRENDERING_HH__
3 
4 #include <bias_config.h>
5 
6 #ifndef BIAS_HAVE_OPENGL
7 # error You need BIAS with USE_OpenGL Please recompile BIAS.
8 #endif // BUILD_GLviewer
9 
10 #include <Gui/biasgl.h>
11 #include <Base/Debug/Debug.hh>
12 
13 #if defined(BIAS_HAVE_GLEW)
14 
15 #define BIAS_HAVE_CLASS_OFFSCREENRENDERING
16 
17 #include <OpenGLFramework/Base/glfFramebufferObject.hh>
18 #include <OpenGLFramework/Base/glfRenderbuffer.hh>
19 #include <OpenGLFramework/Base/glfTexture2D.hh>
20 
21 namespace BIAS {
22 
23  /** @brief Utility class for offscreen rendering used by GLProjection
24  @warning This class can only be used if
25  BIAS_HAVE_CLASS_OFFSCREENRENDERING is defined.
26  @ingroup g_glviewer
27  @author jkollmann */
28  class BIASGLviewer_EXPORT OffscreenRendering : public BIAS::Debug
29  {
30  public:
33 
34  int Init(int imgWidth, int imgHeight);
35  bool IsInitialized() const;
37 
38  private:
39  BIAS::glfRenderbuffer depthBuffer_;
40  BIAS::glfRenderbuffer colorBuffer_;
42  bool initialized_;
43 
45  OffscreenRendering& operator=(const OffscreenRendering&) {return (*this);};
46 
47  };
48 
49 }
50 
51 #endif
52 #endif // __OFFSCREENRENDERING_HH__
53 
Utility class for offscreen rendering used by GLProjection.
The renderbuffer.