gui::gl::render_target Class Reference

A place to render things (the screen, a texture, ...). More...

#include <gui_gl_rendertarget.hpp>

Inheritance diagram for gui::gl::render_target:
gui::render_target

List of all members.

Public Member Functions

 render_target (uint uiWidth, uint uiHeight)
 Constructor.
 ~render_target ()
 Destructor.
void begin ()
 Begins rendering on this target.
void end ()
 Ends rendering on this target.
void clear (const color &mColor)
 Clears the content of this render_target.
uint get_width () const
 Returns this render target's width.
uint get_height () const
 Returns this render target's height.
bool set_dimensions (uint uiWidth, uint uiHeight)
 Sets this render target's dimensions.
uint get_real_width () const
 Returns this render target's real width.
uint get_real_height () const
 Returns this render target's real height.
utils::wptr< gl::materialget_material ()
 Returns the associated texture for rendering.

Static Public Member Functions

static void check_availability ()
 Checks if the machine is capable of using render targets.

Detailed Description

A place to render things (the screen, a texture, ...).

Definition at line 13 of file gui_gl_rendertarget.hpp.


Constructor & Destructor Documentation

gui::gl::render_target::render_target ( uint  uiWidth,
uint  uiHeight 
)

Constructor.

Parameters:
uiWidth The width of the render_target
uiHeight The height of the render_target

Definition at line 12 of file gui_gl_rendertarget.cpp.

gui::gl::render_target::~render_target (  )  [virtual]

Destructor.

Reimplemented from gui::render_target.

Definition at line 32 of file gui_gl_rendertarget.cpp.


Member Function Documentation

void gui::gl::render_target::begin (  )  [virtual]

Begins rendering on this target.

Implements gui::render_target.

Definition at line 38 of file gui_gl_rendertarget.cpp.

void gui::gl::render_target::check_availability (  )  [static]

Checks if the machine is capable of using render targets.

Note:
If not, this function throws a gui::exception.

Definition at line 134 of file gui_gl_rendertarget.cpp.

void gui::gl::render_target::clear ( const color mColor  )  [virtual]

Clears the content of this render_target.

Parameters:
mColor The color to use as background

Implements gui::render_target.

Definition at line 80 of file gui_gl_rendertarget.cpp.

void gui::gl::render_target::end (  )  [virtual]

Ends rendering on this target.

Implements gui::render_target.

Definition at line 75 of file gui_gl_rendertarget.cpp.

uint gui::gl::render_target::get_height (  )  const [virtual]

Returns this render target's height.

Returns:
This render target's height

Implements gui::render_target.

Definition at line 91 of file gui_gl_rendertarget.cpp.

utils::wptr< gl::material > gui::gl::render_target::get_material (  ) 

Returns the associated texture for rendering.

Returns:
The underlying pixel buffer, that you can use to render its content

Definition at line 129 of file gui_gl_rendertarget.cpp.

uint gui::gl::render_target::get_real_height (  )  const [virtual]

Returns this render target's real height.

Returns:
This render target's real height
Note:
This is the physical size of the render target. On some systems, abitrary dimensions are not supported : they can be promoted to the nearest power of two from for example.

Implements gui::render_target.

Definition at line 101 of file gui_gl_rendertarget.cpp.

uint gui::gl::render_target::get_real_width (  )  const [virtual]

Returns this render target's real width.

Returns:
This render target's real width
Note:
This is the physical size of the render target. On some systems, abitrary dimensions are not supported : they can be promoted to the nearest power of two from for example.

Implements gui::render_target.

Definition at line 96 of file gui_gl_rendertarget.cpp.

uint gui::gl::render_target::get_width (  )  const [virtual]

Returns this render target's width.

Returns:
This render target's width

Implements gui::render_target.

Definition at line 86 of file gui_gl_rendertarget.cpp.

bool gui::gl::render_target::set_dimensions ( uint  uiWidth,
uint  uiHeight 
) [virtual]

Sets this render target's dimensions.

Parameters:
uiWidth This render target's width
uiHeight This render target's height
Returns:
'true' if the function had to re-create a new render target

Implements gui::render_target.

Definition at line 106 of file gui_gl_rendertarget.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Tue Jan 1 21:58:13 2013 for gui by  doxygen 1.6.1