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);
120 const int a_displayContext = 0);
156 void setSize(
const unsigned int a_width,
const unsigned int a_height);
213 GLuint
m_fbo[C_MAX_DISPLAY_CONTEXTS];
std::shared_ptr< cTexture2d > cTexture2dPtr
Definition: CTexture2d.h:68
unsigned int m_width
Width in pixels of the frame buffer.
Definition: CFrameBuffer.h:198
void setCamera(cCamera *a_camera)
This method attaches a camera to the framebuffer.
Definition: CFrameBuffer.h:136
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:207
cTexture2dPtr m_imageBuffer
Image buffer.
Definition: CFrameBuffer.h:179
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:106
virtual ~cFrameBuffer()
Destructor of cFrameBuffer.
Definition: CFrameBuffer.cpp:81
unsigned int getHeight() const
This method returns the height in pixels of the framebuffer.
Definition: CFrameBuffer.h:153
unsigned int m_prevWidth
Last width value that was used when allocating texture size.
Definition: CFrameBuffer.h:204
cTexture2dPtr m_depthBuffer
Depth buffer.
Definition: CFrameBuffer.h:182
bool renderInitialize(const int a_displayContext=0)
This method initializes rendering to the framebuffer.
Definition: CFrameBuffer.cpp:265
This class implements an OpenGL framebuffer.
Definition: CFrameBuffer.h:87
GLuint m_fbo[C_MAX_DISPLAY_CONTEXTS]
OpenGL frame buffer object.
Definition: CFrameBuffer.h:213
Implementation of a virtual world.
bool m_useImageBuffer
If true then image buffer is enabled, false otherwise.
Definition: CFrameBuffer.h:192
cFrameBuffer()
Constructor of cFrameBuffer.
Definition: CFrameBuffer.cpp:57
cCamera * m_camera
Camera associated with this framebuffer.
Definition: CFrameBuffer.h:210
unsigned int m_height
Height in pixels of the frame buffer.
Definition: CFrameBuffer.h:201
cCamera * getCamera()
This method returns a pointer to the camera attached to the framebuffer.
Definition: CFrameBuffer.h:139
This class implements a virtual camera.
Definition: CCamera.h:110
void copyDepthBuffer(cImagePtr a_image, const int a_displayContext=0)
This method copies the depth buffer content to an image.
Definition: CFrameBuffer.cpp:221
void copyImageBuffer(cImagePtr a_image, const int a_displayContext=0)
This method copies the framebuffer content to an image.
Definition: CFrameBuffer.cpp:181
Implements color properties.
std::shared_ptr< cImage > cImagePtr
Definition: CImage.h:63
static cFrameBufferPtr create()
Shared cFrameBuffer allocator.
Definition: CFrameBuffer.h:102
Definition: CAudioBuffer.cpp:56
cEyeMode
Definition: CCamera.h:73
bool renderFinalize(const int a_displayContext=0)
This method finalizes the rendering to the framebuffer.
Definition: CFrameBuffer.cpp:445
bool m_useDepthBuffer
If true then image buffer is enabled, false otherwise.
Definition: CFrameBuffer.h:195
void renderView(const cEyeMode a_eyeMode=C_STEREO_LEFT_EYE, const int a_displayContext=0)
This method renders the framebuffer view.
Definition: CFrameBuffer.cpp:472
Implements a 2D image data structure.
unsigned int getWidth() const
This method returns the width in pixels of the framebuffer.
Definition: CFrameBuffer.h:150
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:153