Colobot
|
Abstract interface of default framebuffer and offscreen framebuffers. More...
#include <framebuffer.h>
Public Member Functions | |
virtual bool | Create ()=0 |
Creates this framebuffer. More... | |
virtual void | Destroy ()=0 |
Destroys this framebuffer. More... | |
virtual bool | IsDefault ()=0 |
Returns true if this is default framebuffer. More... | |
virtual int | GetWidth ()=0 |
Returns width of buffers in this framebuffer. More... | |
virtual int | GetHeight ()=0 |
Returns height of buffers in this framebuffer. More... | |
virtual int | GetDepth ()=0 |
Returns depth size in bits. More... | |
virtual int | GetSamples ()=0 |
Returns number of samples or 1 if multisampling is not supported. More... | |
virtual int | GetColorTexture ()=0 |
Returns texture that contains color buffer or 0 if not available. More... | |
virtual int | GetDepthTexture ()=0 |
Returns texture that contains depth buffer or 0 if not available. More... | |
virtual void | Bind ()=0 |
Binds this framebuffer to context. More... | |
virtual void | Unbind ()=0 |
Unbinds this framebuffer from context. More... | |
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. More... | |
Abstract interface of default framebuffer and offscreen framebuffers.
This code encapsulates basics of default framebuffer and offscreen buffers and allows offscreen rendering in generic way. CDevice may or may not implement offscreen buffers depending on available hardware but is required to provide default framebuffer implementation. Because of some hardware restrictions and in order to simplify interface, you can't bind/unbind textures from offscreen buffers and you can't change it's parameters.
|
pure virtual |
Creates this framebuffer.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Destroys this framebuffer.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Returns true if this is default framebuffer.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Returns width of buffers in this framebuffer.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Returns height of buffers in this framebuffer.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Returns depth size in bits.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Returns number of samples or 1 if multisampling is not supported.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Returns texture that contains color buffer or 0 if not available.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Returns texture that contains depth buffer or 0 if not available.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Binds this framebuffer to context.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Unbinds this framebuffer from context.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.
|
pure virtual |
Copies content of color buffer to screen.
Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.