Loading...
Searching...
No Matches
BALL::VIEW::RenderTarget Class Referenceabstract

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

Inheritance diagram for BALL::VIEW::RenderTarget:

## Public Member Functions

virtual | ~RenderTarget ()
virtual FrameBufferPtr | getBuffer ()=0
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 void | setupStereo (float, float)
virtual bool | doNotResize () const =0

## Detailed Description

Definition at line 226 of file renderTarget.h.

## Constructor & Destructor Documentation

## ~RenderTarget()

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

inline virtual

Definition at line 230 of file renderTarget.h.

## Member Function Documentation

## doNotResize()

virtual bool BALL::VIEW::RenderTarget::doNotResize | ( |  | ) | const

pure virtual

Returns true if the window should not be resized.

Implemented in BALL::VIEW::TRenderWindow< taPixelDatatype >, and BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## getBuffer()

virtual FrameBufferPtr BALL::VIEW::RenderTarget::getBuffer | ( |  | ) |

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.

Exceptions

  BALL::Exception::NoBufferAvailable | if no new FrameBuffer can be created for this RenderTarget (e.g. if the RenderTarget supports only a single buffer at a time)

Implemented in BALL::VIEW::TRenderWindow< taPixelDatatype >, and BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## getFormat()

virtual FrameBufferFormat BALL::VIEW::RenderTarget::getFormat | ( |  | ) | const

pure virtual

Implemented in BALL::VIEW::TRenderWindow< taPixelDatatype >, and BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## init()

virtual bool BALL::VIEW::RenderTarget::init | ( |  | ) |

pure virtual

Initialization routine.

Implemented in BALL::VIEW::GLRenderWindow, BALL::VIEW::TRenderWindow< taPixelDatatype >, and BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## prepareRendering()

virtual void BALL::VIEW::RenderTarget::prepareRendering | ( |  | ) |

pure virtual

Implemented in BALL::VIEW::GLOffscreenTarget, BALL::VIEW::TRenderWindow< taPixelDatatype >, and BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## refresh()

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::TRenderWindow< taPixelDatatype >, and BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## releaseBuffer()

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::TRenderWindow< taPixelDatatype >, and BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## resize()

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::TRenderWindow< taPixelDatatype >, and BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## setupStereo()

virtual void BALL::VIEW::RenderTarget::setupStereo | ( | float | ,
|  | float | )

inline virtual

Sets this render target as a part of a stereo setup.

eye_separation denotes the distance along the right vector used by this "eye".

Reimplemented in BALL::VIEW::GLRenderWindow.

Definition at line 272 of file renderTarget.h.