Robotran C Documentation
OglOffscreenVpRenderer.hh
Go to the documentation of this file.
1 
7 #ifndef OGL_OFFSCREEN_VP_RENDERER
8 #define OGL_OFFSCREEN_VP_RENDERER
9 
10 #include "OglViewPointRenderer.hh"
11 #include <glew.h>
12 
13 namespace OpenGLMbs{
14 
15 //forward declaration
16 class MbsWorld3D;
17 class MbsViewPoint;
18 
24 {
25  public:
26  OglOffscreenVpRenderer(MbsWorld3D *w3d, MbsViewPoint* vp, GLenum format = GL_RGB, bool multisample_enable=false);
28 
30  virtual void Render();
31 
34  virtual void GetImagePixels(unsigned char* image, int width, int height);
35 
36  virtual MbsViewPoint* GetViewpoint();
37 
38  private:
40  // buffers for multisampling
44 
45  GLuint width, height;
46 
47  MbsViewPoint* viewpoint;
48 
49 }; // class OglOffscreenVpRenderer
50 
51 
52 } // namespace OpenGLMbs
53 
54 
55 #endif // OGL_OFFSCREEN_VP_RENDERER
56 
OpenGLMbs::OglOffscreenVpRenderer::height
GLuint height
Definition: OglOffscreenVpRenderer.hh:45
OpenGLMbs
Definition: MpegFrameCaptureOptions.hh:6
MbsWorld3D.hh
MbsWorld3D class.
OpenGLMbs::OglOffscreenVpRenderer::render_buf
GLuint render_buf
Definition: OglOffscreenVpRenderer.hh:39
OglViewPointRenderer.hh
OglViewPointRenderer class.
OpenGLMbs::OglViewPointRenderer::format
GLenum format
format to store the pixels
Definition: OglViewPointRenderer.hh:44
OpenGLMbs::OglOffscreenVpRenderer::Render
virtual void Render()
Render the current viewpoint renderer.
Definition: OglOffscreenVpRenderer.cc:88
OpenGLMbs::OglOffscreenVpRenderer::OglOffscreenVpRenderer
OglOffscreenVpRenderer(MbsWorld3D *w3d, MbsViewPoint *vp, GLenum format=GL_RGB, bool multisample_enable=false)
Definition: OglOffscreenVpRenderer.cc:15
OpenGLMbs::OglOffscreenVpRenderer::GetImagePixels
virtual void GetImagePixels(unsigned char *image, int width, int height)
Copy the image data associated to this renderer in the given image buffer.
Definition: OglOffscreenVpRenderer.cc:120
OpenGLMbs::OglViewPointRenderer::Render
virtual void Render()
Render the current viewpoint renderer.
Definition: OglViewPointRenderer.cc:36
OpenGLMbs::OglOffscreenVpRenderer::width
GLuint width
Definition: OglOffscreenVpRenderer.hh:45
OpenGLMbs::OglOffscreenVpRenderer::viewpoint
MbsViewPoint * viewpoint
Definition: OglOffscreenVpRenderer.hh:47
OpenGLMbs::OglOffscreenVpRenderer::multisample_nb
int multisample_nb
Definition: OglOffscreenVpRenderer.hh:43
OglOffscreenVpRenderer.hh
OglOffscreenVpRenderer class.
OpenGLMbs::OglOffscreenVpRenderer::multisample_frame_buf
GLuint multisample_frame_buf
Definition: OglOffscreenVpRenderer.hh:41
OpenGLMbs::OglOffscreenVpRenderer::multisample_render_buf
GLuint multisample_render_buf
Definition: OglOffscreenVpRenderer.hh:41
OpenGLMbs::OglViewPointRenderer::GetWidth
virtual int GetWidth()
Definition: OglViewPointRenderer.cc:55
OpenGLMbs::OglViewPointRenderer
implementation of a MbsViewPointRenderer using OpenGL to render directly to the screen
Definition: OglViewPointRenderer.hh:24
OpenGLMbs::OglOffscreenVpRenderer::GetViewpoint
virtual MbsViewPoint * GetViewpoint()
Definition: OglOffscreenVpRenderer.cc:83
OpenGLMbs::OglOffscreenVpRenderer::frame_buf
GLuint frame_buf
Definition: OglOffscreenVpRenderer.hh:39
OpenGLMbs::OglOffscreenVpRenderer::multisample_enable
bool multisample_enable
Definition: OglOffscreenVpRenderer.hh:42
OpenGLMbs::OglOffscreenVpRenderer::~OglOffscreenVpRenderer
~OglOffscreenVpRenderer()
Definition: OglOffscreenVpRenderer.cc:78
OpenGLMbs::OglOffscreenVpRenderer::depth_buf
GLuint depth_buf
Definition: OglOffscreenVpRenderer.hh:39
OpenGLMbs::OglViewPointRenderer::GetHeight
virtual int GetHeight()
Definition: OglViewPointRenderer.cc:59
OpenGLMbs::OglViewPointRenderer::GetImagePixels
virtual void GetImagePixels(unsigned char *image, int width, int height)
Copy the image data associated to this renderer in the given image buffer.
Definition: OglViewPointRenderer.cc:51
OpenGLMbs::OglOffscreenVpRenderer
implementation of a MbsViewPointRenderer using OpenGL to render offscreen. It re-uses code of OglView...
Definition: OglOffscreenVpRenderer.hh:23