100 virtual void Bind() = 0;
103 virtual void Unbind() = 0;
106 virtual void CopyToScreen(
int fromX,
int fromY,
int fromWidth,
int fromHeight,
int toX,
int toY,
int toWidth,
int toHeight) = 0;
119 int m_width, m_height, m_depth;
152 void Bind()
override;
158 void CopyToScreen(
int fromX,
int fromY,
int fromWidth,
int fromHeight,
int toX,
int toY,
int toWidth,
int toHeight)
override;
void Unbind() override
Unbinds this framebuffer from context.
Definition: framebuffer.cpp:91
virtual void CopyToScreen(int fromX, int fromY, int fromWidth, int fromHeight, int toX, int toY, int toWidth, int toHeight)=0
Copies content of color buffer to screen.
virtual void Destroy()=0
Destroys this framebuffer.
int samples
Requested number of samples for multisampling.
Definition: framebuffer.h:43
bool IsDefault() override
Returns true.
Definition: framebuffer.cpp:44
int GetHeight() override
Returns height of buffers in this framebuffer.
Definition: framebuffer.cpp:56
int GetDepthTexture() override
Returns texture that contains depth buffer or 0 if not available.
Definition: framebuffer.cpp:80
int GetSamples() override
Returns number of samples or 1 if multisampling is not supported.
Definition: framebuffer.cpp:68
void Bind() override
Binds this framebuffer to context.
Definition: framebuffer.cpp: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: framebuffer.cpp:95
virtual int GetSamples()=0
Returns number of samples or 1 if multisampling is not supported.
virtual void Unbind()=0
Unbinds this framebuffer from context.
int depth
Requested depth buffer.
Definition: framebuffer.h:41
int width
Requested width of buffers.
Definition: framebuffer.h:37
virtual int GetWidth()=0
Returns width of buffers in this framebuffer.
virtual bool Create()=0
Creates this framebuffer.
Contains parameters for new framebuffer.
Definition: framebuffer.h:34
virtual int GetHeight()=0
Returns height of buffers in this framebuffer.
Namespace for (new) graphics code.
Definition: app.h:49
int GetDepth() override
Returns depth size in bits.
Definition: framebuffer.cpp:62
virtual int GetDepth()=0
Returns depth size in bits.
virtual void Bind()=0
Binds this framebuffer to context.
int GetColorTexture() override
Returns texture that contains color buffer or 0 if not available.
Definition: framebuffer.cpp:74
int height
Requested height of buffers.
Definition: framebuffer.h:39
bool colorTexture
true requests color texture
Definition: framebuffer.h:45
void LoadDefault()
Loads default values.
Definition: framebuffer.h:50
void Destroy() override
Destroys default framebuffer.
Definition: framebuffer.cpp:40
bool Create() override
Creates default framebuffer.
Definition: framebuffer.cpp:35
int GetWidth() override
Returns width of buffers in this framebuffer.
Definition: framebuffer.cpp:50
bool depthTexture
true requests depth texture
Definition: framebuffer.h:47
Concrete implementation of default framebuffer.
Definition: framebuffer.h:116
virtual int GetColorTexture()=0
Returns texture that contains color buffer or 0 if not available.
Abstract interface of default framebuffer and offscreen framebuffers.
Definition: framebuffer.h:67
virtual int GetDepthTexture()=0
Returns texture that contains depth buffer or 0 if not available.
virtual bool IsDefault()=0
Returns true if this is default framebuffer.