BALL::VIEW::RenderWindow< taPixelDatatype > Class Template Reference

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

Inheritance diagram for BALL::VIEW::RenderWindow< taPixelDatatype >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Protected Attributes

t_PixelPtr m_pixels
FrameBufferPtr m_framebuffer
FrameBufferFormat m_fmt
const PixelFormat m_pfm
bool m_bufferLocked
const unsigned int m_minimalWidth
const unsigned int m_minimalHeight

Private Types

typedef boost::shared_array
< taPixelDatatype > 
t_PixelPtr

Private Member Functions

 BALLVIEW_STATIC_ASSERT_TYPE_IS_INT_OR_FLOAT (taPixelDatatype)

Detailed Description

template<typename taPixelDatatype>
class BALL::VIEW::RenderWindow< 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 31 of file renderWindow.h.


Member Typedef Documentation

template<typename taPixelDatatype>
typedef boost::shared_array<taPixelDatatype> BALL::VIEW::RenderWindow< taPixelDatatype >::t_PixelPtr [private]

Definition at line 37 of file renderWindow.h.


Constructor & Destructor Documentation

template<typename taPixelDatatype>
BALL::VIEW::RenderWindow< taPixelDatatype >::RenderWindow (  ) 
template<typename taPixelDatatype>
virtual BALL::VIEW::RenderWindow< taPixelDatatype >::~RenderWindow (  )  [virtual]

Member Function Documentation

template<typename taPixelDatatype>
BALL::VIEW::RenderWindow< taPixelDatatype >::BALLVIEW_STATIC_ASSERT_TYPE_IS_INT_OR_FLOAT ( taPixelDatatype   )  [private]
template<typename taPixelDatatype>
virtual FrameBufferPtr BALL::VIEW::RenderWindow< taPixelDatatype >::getBuffer (  )  throw (BALL::Exception::NoBufferAvailable) [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.

Implements BALL::VIEW::RenderTarget.

template<typename taPixelDatatype>
virtual FrameBufferFormat BALL::VIEW::RenderWindow< taPixelDatatype >::getFormat (  )  const [virtual]
template<typename taPixelDatatype>
virtual bool BALL::VIEW::RenderWindow< taPixelDatatype >::init (  )  [virtual]

Initialization routine.

Implements BALL::VIEW::RenderTarget.

Reimplemented in BALL::VIEW::GLRenderWindow.

template<typename taPixelDatatype>
virtual void BALL::VIEW::RenderWindow< taPixelDatatype >::prepareRendering (  )  [inline, virtual]

Implements BALL::VIEW::RenderTarget.

Reimplemented in BALL::VIEW::GLOffscreenTarget.

Definition at line 92 of file renderWindow.h.

template<typename taPixelDatatype>
virtual void BALL::VIEW::RenderWindow< 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.

template<typename taPixelDatatype>
virtual void BALL::VIEW::RenderWindow< 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.

template<typename taPixelDatatype>
virtual bool BALL::VIEW::RenderWindow< 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.


Member Data Documentation

template<typename taPixelDatatype>
bool BALL::VIEW::RenderWindow< taPixelDatatype >::m_bufferLocked [protected]

Definition at line 99 of file renderWindow.h.

template<typename taPixelDatatype>
FrameBufferFormat BALL::VIEW::RenderWindow< taPixelDatatype >::m_fmt [protected]

Definition at line 97 of file renderWindow.h.

template<typename taPixelDatatype>
FrameBufferPtr BALL::VIEW::RenderWindow< taPixelDatatype >::m_framebuffer [protected]

Definition at line 96 of file renderWindow.h.

template<typename taPixelDatatype>
const unsigned int BALL::VIEW::RenderWindow< taPixelDatatype >::m_minimalHeight [protected]

Definition at line 101 of file renderWindow.h.

template<typename taPixelDatatype>
const unsigned int BALL::VIEW::RenderWindow< taPixelDatatype >::m_minimalWidth [protected]

Definition at line 100 of file renderWindow.h.

template<typename taPixelDatatype>
const PixelFormat BALL::VIEW::RenderWindow< taPixelDatatype >::m_pfm [protected]

Definition at line 98 of file renderWindow.h.

template<typename taPixelDatatype>
t_PixelPtr BALL::VIEW::RenderWindow< taPixelDatatype >::m_pixels [protected]

Definition at line 92 of file renderWindow.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Generated by  doxygen 1.6.3