#include <BALL/VIEW/RENDERING/renderTarget.h>
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 |
virtual BALL::VIEW::RenderTarget::~RenderTarget | ( | ) | [inline, virtual] |
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] |
Implemented in BALL::VIEW::RenderWindow< taPixelDatatype >, and BALL::VIEW::RenderWindow< float >.
virtual bool BALL::VIEW::RenderTarget::init | ( | ) | [pure virtual] |
Initialization routine.
Implemented in BALL::VIEW::GLRenderWindow, BALL::VIEW::RenderWindow< taPixelDatatype >, and BALL::VIEW::RenderWindow< float >.
virtual void BALL::VIEW::RenderTarget::prepareRendering | ( | ) | [pure virtual] |
virtual void BALL::VIEW::RenderTarget::refresh | ( | ) | [pure virtual] |
Refresh the contents of the target buffer.
Implemented in BALL::VIEW::GLOffscreenTarget, BALL::VIEW::GLRenderWindow, BALL::VIEW::RenderWindow< taPixelDatatype >, and BALL::VIEW::RenderWindow< float >.
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] |
Resize method.
Implemented in BALL::VIEW::GLOffscreenTarget, BALL::VIEW::GLRenderWindow, BALL::VIEW::RenderWindow< taPixelDatatype >, and BALL::VIEW::RenderWindow< float >.