BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
BALL::VIEW::RenderTarget Class Referenceabstract

#include <BALL/VIEW/RENDERING/renderTarget.h>

Inheritance diagram for BALL::VIEW::RenderTarget:
BALL::VIEW::RenderWindow< taPixelDatatype > BALL::VIEW::RenderWindow< float > BALL::VIEW::GLOffscreenTarget BALL::VIEW::GLRenderWindow

Public Member Functions

virtual ~RenderTarget ()
 
virtual FrameBufferPtr getBuffer ()=0 throw (BALL::Exception::NoBufferAvailable)
 
virtual FrameBufferFormat getFormat () const =0
 
virtual void releaseBuffer (FrameBufferPtr buffer)=0
 
virtual bool init ()=0
 
virtual bool resize (const unsigned int width, const unsigned int height)=0
 
virtual void refresh ()=0
 
virtual void prepareRendering ()=0
 

Detailed Description

Definition at line 226 of file renderTarget.h.

Constructor & Destructor Documentation

virtual BALL::VIEW::RenderTarget::~RenderTarget ( )
inlinevirtual

Definition at line 230 of file renderTarget.h.

Member Function Documentation

virtual FrameBufferPtr BALL::VIEW::RenderTarget::getBuffer ( ) throw (BALL::Exception::NoBufferAvailable)
pure virtual

Returns a buffer where the image data can be stored in the format specified in the constructor. The buffer will remain valid until update() is called with that buffer. Each call to getBuffer() creates a new FrameBuffer. If no new FrameBuffer can be created for this RenderTarget (e.g. if the RenderTarget supports only a single buffer at a time), a NoBufferAvailable exception is thrown.

Implemented in BALL::VIEW::RenderWindow< taPixelDatatype >, and BALL::VIEW::RenderWindow< float >.

virtual FrameBufferFormat BALL::VIEW::RenderTarget::getFormat ( ) const
pure virtual
virtual bool BALL::VIEW::RenderTarget::init ( )
pure virtual
virtual void BALL::VIEW::RenderTarget::prepareRendering ( )
pure virtual
virtual void BALL::VIEW::RenderTarget::refresh ( )
pure virtual
virtual void BALL::VIEW::RenderTarget::releaseBuffer ( FrameBufferPtr  buffer)
pure virtual

Notify the RenderTarget that the buffer has changed. The Renderer has to call this once it has filled the buffer (i.e. after each frame). This may cause the buffer to become invalid. Therefore, the Renderer should get a new buffer for the next frame (with getBuffer()).

Implemented in BALL::VIEW::RenderWindow< taPixelDatatype >, and BALL::VIEW::RenderWindow< float >.

virtual bool BALL::VIEW::RenderTarget::resize ( const unsigned int  width,
const unsigned int  height 
)
pure virtual