24 #include "graphics/opengl/glutil.h" 41 int m_width, m_height, m_depth, m_samples;
44 GLuint m_colorRenderbuffer;
45 GLuint m_colorTexture;
46 GLuint m_depthRenderbuffer;
47 GLuint m_depthTexture;
49 static GLuint m_currentFBO;
76 void CopyToScreen(
int fromX,
int fromY,
int fromWidth,
int fromHeight,
int toX,
int toY,
int toWidth,
int toHeight)
override;
91 int m_width, m_height, m_depth, m_samples;
94 GLuint m_colorRenderbuffer;
95 GLuint m_colorTexture;
96 GLuint m_depthRenderbuffer;
97 GLuint m_depthTexture;
99 static GLuint m_currentFBO;
122 void Bind()
override;
126 void CopyToScreen(
int fromX,
int fromY,
int fromWidth,
int fromHeight,
int toX,
int toY,
int toWidth,
int toHeight)
override;
Abstract representation of framebuffer and offscreen buffers.
int GetHeight() override
Returns height of buffers in this framebuffer.
Definition: glframebuffer.cpp:241
void Destroy() override
Destroys this framebuffer.
Definition: glframebuffer.cpp:189
int GetSamples() override
Returns number of samples or 1 if multisampling is not supported.
Definition: glframebuffer.cpp:253
Definition: glframebuffer.h:86
void CopyToScreen(int fromX, int fromY, int fromWidth, int fromHeight, int toX, int toY, int toWidth, int toHeight) override
Copies content of color buffer to screen.
Definition: glframebuffer.cpp:284
void Bind() override
Binds this framebuffer to context.
Definition: glframebuffer.cpp:271
bool Create() override
Creates this framebuffer.
Definition: glframebuffer.cpp:45
int GetDepth() override
Returns depth size in bits.
Definition: glframebuffer.cpp:247
Contains parameters for new framebuffer.
Definition: framebuffer.h:34
Namespace for (new) graphics code.
Definition: app.h:49
Implementation of CFramebuffer interface in OpenGL 3.0+.
Definition: glframebuffer.h:36
int GetColorTexture() override
Returns texture that contains color buffer or 0 if not available.
Definition: glframebuffer.cpp:259
int GetWidth() override
Returns width of buffers in this framebuffer.
Definition: glframebuffer.cpp:235
bool IsDefault() override
Returns true if this is default framebuffer.
Definition: glframebuffer.cpp:229
void Unbind() override
Unbinds this framebuffer from context.
Definition: glframebuffer.cpp:278
Abstract interface of default framebuffer and offscreen framebuffers.
Definition: framebuffer.h:67
int GetDepthTexture() override
Returns texture that contains depth buffer or 0 if not available.
Definition: glframebuffer.cpp:265