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:207
int GetHeight() override
Returns height of buffers in this framebuffer.
Definition: glframebuffer.cpp:439
int GetSamples() override
Returns number of samples or 1 if multisampling is not supported.
Definition: glframebuffer.cpp:451
int GetDepth() override
Returns depth size in bits.
Definition: glframebuffer.cpp:445
void Create() override
Creates this framebuffer.
Definition: glframebuffer.cpp:277
void Destroy() override
Destroys this framebuffer.
Definition: glframebuffer.cpp:155
int GetSamples() override
Returns number of samples or 1 if multisampling is not supported.
Definition: glframebuffer.cpp:219
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:250
bool IsDefault() override
Returns true if this is default framebuffer.
Definition: glframebuffer.cpp:427
void Bind() override
Binds this framebuffer to context.
Definition: glframebuffer.cpp:237
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:482
int GetDepth() override
Returns depth size in bits.
Definition: glframebuffer.cpp:213
Contains parameters for new framebuffer.
Definition: framebuffer.h:34
void Bind() override
Binds this framebuffer to context.
Definition: glframebuffer.cpp:469
void Unbind() override
Unbinds this framebuffer from context.
Definition: glframebuffer.cpp:476
int GetWidth() override
Returns width of buffers in this framebuffer.
Definition: glframebuffer.cpp:433
Namespace for (new) graphics code.
Definition: app.h:49
Implementation of CFramebuffer interface in OpenGL 3.0+.
Definition: glframebuffer.h:36
void Destroy() override
Destroys this framebuffer.
Definition: glframebuffer.cpp:387
int GetColorTexture() override
Returns texture that contains color buffer or 0 if not available.
Definition: glframebuffer.cpp:225
int GetWidth() override
Returns width of buffers in this framebuffer.
Definition: glframebuffer.cpp:201
void Create() override
Creates this framebuffer.
Definition: glframebuffer.cpp:45
bool IsDefault() override
Returns true if this is default framebuffer.
Definition: glframebuffer.cpp:195
int GetDepthTexture() override
Returns texture that contains depth buffer or 0 if not available.
Definition: glframebuffer.cpp:463
void Unbind() override
Unbinds this framebuffer from context.
Definition: glframebuffer.cpp:244
int GetColorTexture() override
Returns texture that contains color buffer or 0 if not available.
Definition: glframebuffer.cpp:457
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:231