Loading...
Searching...
No Matches
BALL::VIEW::TRenderWindow< taPixelDatatype > Class Template Reference

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

Inheritance diagram for BALL::VIEW::TRenderWindow< taPixelDatatype >:

## Public Member Functions

| TRenderWindow ()
virtual | ~TRenderWindow ()
virtual bool | init ()
virtual bool | resize (const unsigned int width, const unsigned int height)
virtual void | refresh ()
virtual FrameBufferPtr | getBuffer ()
virtual FrameBufferFormat | getFormat () const
virtual void | releaseBuffer (FrameBufferPtr buffer)
virtual void | prepareRendering ()
virtual bool | doNotResize () const
virtual void | setDoNotResize (bool do_not_resize)
Public Member Functions inherited from BALL::VIEW::RenderTarget
virtual | ~RenderTarget ()
virtual void | setupStereo (float, float)

## Protected Attributes

t_PixelPtr | m_pixels
FrameBufferPtr | m_framebuffer
FrameBufferFormat | m_fmt
const PixelFormat | m_pfm
bool | m_bufferLocked
const Size | m_minimalWidth
const Size | m_minimalHeight
bool | do_not_resize_

## Detailed Description

template<typename taPixelDatatype>
class BALL::VIEW::TRenderWindow< taPixelDatatype >

General rendering window interface. Such a window represents a surface on a screen or other device, where a buffer encapsulated by RenderTarget interface can be displayed

Definition at line 33 of file renderWindow.h.

## Constructor & Destructor Documentation

## TRenderWindow()

template<typename taPixelDatatype>

BALL::VIEW::TRenderWindow< taPixelDatatype >::TRenderWindow | ( |  | ) |

## ~TRenderWindow()

template<typename taPixelDatatype>

virtual BALL::VIEW::TRenderWindow< taPixelDatatype >::~TRenderWindow | ( |  | ) |

virtual

## Member Function Documentation

## doNotResize()

template<typename taPixelDatatype>

virtual bool BALL::VIEW::TRenderWindow< taPixelDatatype >::doNotResize | ( |  | ) | const

inline virtual

Returns true if the window should not be resized.

Implements BALL::VIEW::RenderTarget.

Definition at line 99 of file renderWindow.h.

## getBuffer()

template<typename taPixelDatatype>

virtual FrameBufferPtr BALL::VIEW::TRenderWindow< taPixelDatatype >::getBuffer | ( |  | ) |

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)

Implements BALL::VIEW::RenderTarget.

## getFormat()

template<typename taPixelDatatype>

virtual FrameBufferFormat BALL::VIEW::TRenderWindow< taPixelDatatype >::getFormat | ( |  | ) | const

virtual

Implements BALL::VIEW::RenderTarget.

## init()

template<typename taPixelDatatype>

virtual bool BALL::VIEW::TRenderWindow< taPixelDatatype >::init | ( |  | ) |

virtual

Initialization routine.

Implements BALL::VIEW::RenderTarget.

Reimplemented in BALL::VIEW::GLRenderWindow.

## prepareRendering()

template<typename taPixelDatatype>

virtual void BALL::VIEW::TRenderWindow< taPixelDatatype >::prepareRendering | ( |  | ) |

inline virtual

Implements BALL::VIEW::RenderTarget.

Reimplemented in BALL::VIEW::GLOffscreenTarget.

Definition at line 95 of file renderWindow.h.

## refresh()

template<typename taPixelDatatype>

virtual void BALL::VIEW::TRenderWindow< taPixelDatatype >::refresh | ( |  | ) |

virtual

Request that the image is actually displayed on the screen or other device the window encapsulated. You should implement this method in subclass. This is different from RenderTarget releaseBuffer. ReleaseBuffer only informs the window that a buffer is ready, but does not imply the buffer is actually displayed somewhere. This is done by refresh. On the other hand, refresh called inbetween getBuffer and releaseBuffer has no effect.

Implements BALL::VIEW::RenderTarget.

Reimplemented in BALL::VIEW::GLOffscreenTarget, and BALL::VIEW::GLRenderWindow.

## releaseBuffer()

template<typename taPixelDatatype>

virtual void BALL::VIEW::TRenderWindow< taPixelDatatype >::releaseBuffer | ( | FrameBufferPtr | buffer | ) |

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

Implements BALL::VIEW::RenderTarget.

## resize()

template<typename taPixelDatatype>

virtual bool BALL::VIEW::TRenderWindow< taPixelDatatype >::resize | ( | const unsigned int | width,
|  | const unsigned int | height )

virtual

Request new window size. Returns false if such a size cannot be supplied This call must be made before the window buffer is handed out to be rendered. This precondition is being checked automatically, see getBuffer

Implements BALL::VIEW::RenderTarget.

Reimplemented in BALL::VIEW::GLOffscreenTarget, and BALL::VIEW::GLRenderWindow.

## setDoNotResize()

template<typename taPixelDatatype>

virtual void BALL::VIEW::TRenderWindow< taPixelDatatype >::setDoNotResize | ( | bool | do_not_resize | ) |

inline virtual

Definition at line 101 of file renderWindow.h.

## Member Data Documentation

## do_not_resize_

template<typename taPixelDatatype>

bool BALL::VIEW::TRenderWindow< taPixelDatatype >::do_not_resize_

protected

Definition at line 112 of file renderWindow.h.

## m_bufferLocked

template<typename taPixelDatatype>

bool BALL::VIEW::TRenderWindow< taPixelDatatype >::m_bufferLocked

protected

Definition at line 109 of file renderWindow.h.

## m_fmt

template<typename taPixelDatatype>

FrameBufferFormat BALL::VIEW::TRenderWindow< taPixelDatatype >::m_fmt

protected

Definition at line 107 of file renderWindow.h.

## m_framebuffer

template<typename taPixelDatatype>

FrameBufferPtr BALL::VIEW::TRenderWindow< taPixelDatatype >::m_framebuffer

protected

Definition at line 106 of file renderWindow.h.

## m_minimalHeight

template<typename taPixelDatatype>

const Size BALL::VIEW::TRenderWindow< taPixelDatatype >::m_minimalHeight

protected

Definition at line 111 of file renderWindow.h.

## m_minimalWidth

template<typename taPixelDatatype>

const Size BALL::VIEW::TRenderWindow< taPixelDatatype >::m_minimalWidth

protected

Definition at line 110 of file renderWindow.h.

## m_pfm

template<typename taPixelDatatype>

const PixelFormat BALL::VIEW::TRenderWindow< taPixelDatatype >::m_pfm

protected

Definition at line 108 of file renderWindow.h.

## m_pixels

template<typename taPixelDatatype>

t_PixelPtr BALL::VIEW::TRenderWindow< taPixelDatatype >::m_pixels

protected

Definition at line 105 of file renderWindow.h.