113 const unsigned int a_width = 0,
114 const unsigned int a_height = 0,
115 const bool a_enableImageBuffer =
true,
116 const bool a_enableDepthBuffer =
true);
155 void setSize(
const unsigned int a_width,
const unsigned int a_height);
Implements color properties.
Implements a 2D image data structure.
Implementation of a virtual world.
This class implements a virtual camera.
Definition CCamera.h:111
This class implements an OpenGL framebuffer.
Definition CFrameBuffer.h:88
void setSize(const unsigned int a_width, const unsigned int a_height)
This method sets the resolution of the framebuffer by defining its width and height in pixels.
Definition CFrameBuffer.cpp:147
unsigned int m_width
Width in pixels of the frame buffer.
Definition CFrameBuffer.h:197
unsigned int m_prevWidth
Last width value that was used when allocating texture size.
Definition CFrameBuffer.h:203
bool m_useDepthBuffer
If true then image buffer is enabled, false otherwise.
Definition CFrameBuffer.h:194
void copyDepthBuffer(cImagePtr a_image)
This method copies the depth buffer content to an image.
Definition CFrameBuffer.cpp:219
void copyImageBuffer(cImagePtr a_image)
This method copies the framebuffer content to an image.
Definition CFrameBuffer.cpp:180
bool renderFinalize()
This method finalizes the rendering to the framebuffer.
Definition CFrameBuffer.cpp:439
cTexture2dPtr m_imageBuffer
Image buffer.
Definition CFrameBuffer.h:178
void renderView(const cEyeMode a_eyeMode=C_STEREO_LEFT_EYE)
This method renders the framebuffer view.
Definition CFrameBuffer.cpp:465
GLuint m_fbo
OpenGL frame buffer object.
Definition CFrameBuffer.h:212
unsigned int m_prevHeight
Last height value that was used when allocating texture size.
Definition CFrameBuffer.h:206
cTexture2dPtr m_depthBuffer
Depth buffer.
Definition CFrameBuffer.h:181
unsigned int m_height
Height in pixels of the frame buffer.
Definition CFrameBuffer.h:200
bool renderInitialize()
This method initializes rendering to the framebuffer.
Definition CFrameBuffer.cpp:261
void setCamera(cCamera *a_camera)
This method attaches a camera to the framebuffer.
Definition CFrameBuffer.h:135
cFrameBuffer()
Constructor of cFrameBuffer.
Definition CFrameBuffer.cpp:57
virtual ~cFrameBuffer()
Destructor of cFrameBuffer.
Definition CFrameBuffer.cpp:75
void setup(cCamera *a_camera=NULL, const unsigned int a_width=0, const unsigned int a_height=0, const bool a_enableImageBuffer=true, const bool a_enableDepthBuffer=true)
This method initializes the framebuffer.
Definition CFrameBuffer.cpp:100
static cFrameBufferPtr create()
Shared cFrameBuffer allocator.
Definition CFrameBuffer.h:102
unsigned int getWidth() const
This method returns the width in pixels of the framebuffer.
Definition CFrameBuffer.h:149
cCamera * getCamera()
This method returns a pointer to the camera attached to the framebuffer.
Definition CFrameBuffer.h:138
cCamera * m_camera
Camera associated with this framebuffer.
Definition CFrameBuffer.h:209
bool m_useImageBuffer
If true then image buffer is enabled, false otherwise.
Definition CFrameBuffer.h:191
unsigned int getHeight() const
This method returns the height in pixels of the framebuffer.
Definition CFrameBuffer.h:152
Definition CAudioBuffer.cpp:57
cEyeMode
Definition CCamera.h:74
@ C_STEREO_LEFT_EYE
Definition CCamera.h:75
std::shared_ptr< cFrameBuffer > cFrameBufferPtr
Definition CFrameBuffer.h:72
std::shared_ptr< cImage > cImagePtr
Definition CImage.h:64
std::shared_ptr< cTexture2d > cTexture2dPtr
Definition CTexture2d.h:69