Colobot
Public Member Functions | List of all members
Gfx::CFramebuffer Class Referenceabstract

Abstract interface of default framebuffer and offscreen framebuffers. More...

#include <framebuffer.h>

Inheritance diagram for Gfx::CFramebuffer:
Inheritance graph
[legend]

Public Member Functions

virtual void Create ()=0
 Creates this framebuffer.
 
virtual void Destroy ()=0
 Destroys this framebuffer.
 
virtual bool IsDefault ()=0
 Returns true if this is default framebuffer.
 
virtual int GetWidth ()=0
 Returns width of buffers in this framebuffer.
 
virtual int GetHeight ()=0
 Returns height of buffers in this framebuffer.
 
virtual int GetDepth ()=0
 Returns depth size in bits.
 
virtual int GetSamples ()=0
 Returns number of samples or 1 if multisampling is not supported.
 
virtual int GetColorTexture ()=0
 Returns texture that contains color buffer or 0 if not available.
 
virtual int GetDepthTexture ()=0
 Returns texture that contains depth buffer or 0 if not available.
 
virtual void Bind ()=0
 Binds this framebuffer to context.
 
virtual void Unbind ()=0
 Unbinds this framebuffer from context.
 
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.
 

Detailed Description

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.


The documentation for this class was generated from the following file: