BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
BALL::VIEW::TRenderWindow< taPixelDatatype > Class Template Reference

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

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

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 () throw (BALL::Exception::NoBufferAvailable)
 
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

template<typename taPixelDatatype >
BALL::VIEW::TRenderWindow< taPixelDatatype >::TRenderWindow ( )
template<typename taPixelDatatype >
virtual BALL::VIEW::TRenderWindow< taPixelDatatype >::~TRenderWindow ( )
virtual

Member Function Documentation

template<typename taPixelDatatype >
virtual bool BALL::VIEW::TRenderWindow< taPixelDatatype >::doNotResize ( ) const
inlinevirtual

Returns true if the window should not be resized.

Implements BALL::VIEW::RenderTarget.

Definition at line 98 of file renderWindow.h.

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

Exceptions
Exception::NoBufferAvailableif 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.

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

Initialization routine.

Implements BALL::VIEW::RenderTarget.

Reimplemented in BALL::VIEW::GLRenderWindow.

template<typename taPixelDatatype >
virtual void BALL::VIEW::TRenderWindow< taPixelDatatype >::prepareRendering ( )
inlinevirtual

Implements BALL::VIEW::RenderTarget.

Reimplemented in BALL::VIEW::GLOffscreenTarget.

Definition at line 94 of file renderWindow.h.

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::GLRenderWindow, and BALL::VIEW::GLOffscreenTarget.

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.

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::GLRenderWindow, and BALL::VIEW::GLOffscreenTarget.

template<typename taPixelDatatype >
virtual void BALL::VIEW::TRenderWindow< taPixelDatatype >::setDoNotResize ( bool  do_not_resize)
inlinevirtual

Definition at line 100 of file renderWindow.h.

Member Data Documentation

template<typename taPixelDatatype >
bool BALL::VIEW::TRenderWindow< taPixelDatatype >::do_not_resize_
protected

Definition at line 111 of file renderWindow.h.

template<typename taPixelDatatype >
bool BALL::VIEW::TRenderWindow< taPixelDatatype >::m_bufferLocked
protected

Definition at line 108 of file renderWindow.h.

template<typename taPixelDatatype >
FrameBufferFormat BALL::VIEW::TRenderWindow< taPixelDatatype >::m_fmt
protected

Definition at line 106 of file renderWindow.h.

template<typename taPixelDatatype >
FrameBufferPtr BALL::VIEW::TRenderWindow< taPixelDatatype >::m_framebuffer
protected

Definition at line 105 of file renderWindow.h.

template<typename taPixelDatatype >
const Size BALL::VIEW::TRenderWindow< taPixelDatatype >::m_minimalHeight
protected

Definition at line 110 of file renderWindow.h.

template<typename taPixelDatatype >
const Size BALL::VIEW::TRenderWindow< taPixelDatatype >::m_minimalWidth
protected

Definition at line 109 of file renderWindow.h.

template<typename taPixelDatatype >
const PixelFormat BALL::VIEW::TRenderWindow< taPixelDatatype >::m_pfm
protected

Definition at line 107 of file renderWindow.h.

template<typename taPixelDatatype >
t_PixelPtr BALL::VIEW::TRenderWindow< taPixelDatatype >::m_pixels
protected

Definition at line 104 of file renderWindow.h.