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 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...
 

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.

Member Function Documentation

virtual bool Gfx::CFramebuffer::Create ( )
pure virtual

Creates this framebuffer.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual void Gfx::CFramebuffer::Destroy ( )
pure virtual

Destroys this framebuffer.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual bool Gfx::CFramebuffer::IsDefault ( )
pure virtual

Returns true if this is default framebuffer.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual int Gfx::CFramebuffer::GetWidth ( )
pure virtual

Returns width of buffers in this framebuffer.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual int Gfx::CFramebuffer::GetHeight ( )
pure virtual

Returns height of buffers in this framebuffer.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual int Gfx::CFramebuffer::GetDepth ( )
pure virtual

Returns depth size in bits.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual int Gfx::CFramebuffer::GetSamples ( )
pure virtual

Returns number of samples or 1 if multisampling is not supported.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual int Gfx::CFramebuffer::GetColorTexture ( )
pure virtual

Returns texture that contains color buffer or 0 if not available.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual int Gfx::CFramebuffer::GetDepthTexture ( )
pure virtual

Returns texture that contains depth buffer or 0 if not available.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual void Gfx::CFramebuffer::Bind ( )
pure virtual

Binds this framebuffer to context.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual void Gfx::CFramebuffer::Unbind ( )
pure virtual

Unbinds this framebuffer from context.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.

virtual void Gfx::CFramebuffer::CopyToScreen ( int  fromX,
int  fromY,
int  fromWidth,
int  fromHeight,
int  toX,
int  toY,
int  toWidth,
int  toHeight 
)
pure virtual

Copies content of color buffer to screen.

Implemented in Gfx::CDefaultFramebuffer, Gfx::CGLFramebufferEXT, and Gfx::CGLFramebuffer.


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