102 static cFrameBufferPtr
create() {
return (std::make_shared<cFrameBuffer>()); }
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);
void copyImageBuffer(cImagePtr a_image)
This method copies the framebuffer content to an image.
Definition: CFrameBuffer.cpp:174
std::shared_ptr< cTexture2d > cTexture2dPtr
Definition: CTexture2d.h:68
unsigned int m_width
Width in pixels of the frame buffer.
Definition: CFrameBuffer.h:197
void setCamera(cCamera *a_camera)
This method attaches a camera to the framebuffer.
Definition: CFrameBuffer.h:135
std::shared_ptr< cFrameBuffer > cFrameBufferPtr
Definition: CFrameBuffer.h:71
unsigned int m_prevHeight
Last height value that was used when allocating texture size.
Definition: CFrameBuffer.h:206
cTexture2dPtr m_imageBuffer
Image buffer.
Definition: CFrameBuffer.h:178
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
virtual ~cFrameBuffer()
Destructor of cFrameBuffer.
Definition: CFrameBuffer.cpp:75
void copyDepthBuffer(cImagePtr a_image)
This method copies the depth buffer content to an image.
Definition: CFrameBuffer.cpp:213
unsigned int getHeight() const
This method returns the height in pixels of the framebuffer.
Definition: CFrameBuffer.h:152
unsigned int m_prevWidth
Last width value that was used when allocating texture size.
Definition: CFrameBuffer.h:203
cTexture2dPtr m_depthBuffer
Depth buffer.
Definition: CFrameBuffer.h:181
This class implements an OpenGL framebuffer.
Definition: CFrameBuffer.h:87
Implementation of a virtual world.
bool m_useImageBuffer
If true then image buffer is enabled, false otherwise.
Definition: CFrameBuffer.h:191
cFrameBuffer()
Constructor of cFrameBuffer.
Definition: CFrameBuffer.cpp:57
cCamera * m_camera
Camera associated with this framebuffer.
Definition: CFrameBuffer.h:209
unsigned int m_height
Height in pixels of the frame buffer.
Definition: CFrameBuffer.h:200
GLuint m_fbo
OpenGL frame buffer object.
Definition: CFrameBuffer.h:212
cCamera * getCamera()
This method returns a pointer to the camera attached to the framebuffer.
Definition: CFrameBuffer.h:138
This class implements a virtual camera.
Definition: CCamera.h:110
Implements color properties.
std::shared_ptr< cImage > cImagePtr
Definition: CImage.h:63
void renderView(const cEyeMode a_eyeMode=C_STEREO_LEFT_EYE)
This method renders the framebuffer view.
Definition: CFrameBuffer.cpp:459
static cFrameBufferPtr create()
Shared cFrameBuffer allocator.
Definition: CFrameBuffer.h:102
Definition: CAudioBuffer.cpp:56
cEyeMode
Definition: CCamera.h:73
bool m_useDepthBuffer
If true then image buffer is enabled, false otherwise.
Definition: CFrameBuffer.h:194
Implements a 2D image data structure.
bool renderFinalize()
This method finalizes the rendering to the framebuffer.
Definition: CFrameBuffer.cpp:433
unsigned int getWidth() const
This method returns the width in pixels of the framebuffer.
Definition: CFrameBuffer.h:149
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
bool renderInitialize()
This method initializes rendering to the framebuffer.
Definition: CFrameBuffer.cpp:255