Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Protected Member Functions | Protected Attributes

mrpt::opengl::CFBORender Class Reference


Detailed Description

A class for rendering 3D scenes off-screen directly into an image using OpenGL extensions (glext).

Note:
This class is in a "experimental state".
See also:
Example "fbo_render_test"

Definition at line 43 of file CFBORender.h.

#include <mrpt/opengl/CFBORender.h>

List of all members.

Public Member Functions

 CFBORender (unsigned int width=800, unsigned int height=600)
 Constructor.
virtual ~CFBORender ()
 Destructor.
void setCamera (const COpenGLScene &scene, const CCamera &camera)
 Change the scene camera.
CCameragetCamera (const COpenGLScene &scene)
 Get a reference to the scene camera.
void getFrame (const COpenGLScene &scene, mrpt::utils::CImage &image)
 Render the scene and get the rendered rgb image.
void getFrame2 (const COpenGLScene &scene, mrpt::utils::CImage &image)
 Render the scene and get the rendered rgb image.
void resize (unsigned int width, unsigned int height)
 Resize the image size.

Protected Member Functions

int isExtensionSupported (const char *extension)
 Provide information on Framebuffer object extension.

Protected Attributes

int m_win
int m_width
int m_height
unsigned int m_fbo
unsigned int m_tex

Constructor & Destructor Documentation

mrpt::opengl::CFBORender::CFBORender ( unsigned int  width = 800,
unsigned int  height = 600 
)

Constructor.

virtual mrpt::opengl::CFBORender::~CFBORender ( ) [virtual]

Destructor.


Member Function Documentation

CCamera& mrpt::opengl::CFBORender::getCamera ( const COpenGLScene scene)

Get a reference to the scene camera.

void mrpt::opengl::CFBORender::getFrame ( const COpenGLScene scene,
mrpt::utils::CImage image 
)

Render the scene and get the rendered rgb image.

Resizes the image buffer if it is necessary.

void mrpt::opengl::CFBORender::getFrame2 ( const COpenGLScene scene,
mrpt::utils::CImage image 
)

Render the scene and get the rendered rgb image.

Does not resize the image buffer. MANDATORY: The image origin must be bottom left.

int mrpt::opengl::CFBORender::isExtensionSupported ( const char *  extension) [protected]

Provide information on Framebuffer object extension.

void mrpt::opengl::CFBORender::resize ( unsigned int  width,
unsigned int  height 
)

Resize the image size.

void mrpt::opengl::CFBORender::setCamera ( const COpenGLScene scene,
const CCamera camera 
)

Change the scene camera.


Member Data Documentation

unsigned int mrpt::opengl::CFBORender::m_fbo [protected]

Definition at line 79 of file CFBORender.h.

Definition at line 78 of file CFBORender.h.

unsigned int mrpt::opengl::CFBORender::m_tex [protected]

Definition at line 79 of file CFBORender.h.

Definition at line 78 of file CFBORender.h.

Definition at line 78 of file CFBORender.h.




Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011