Mondschein Engine  0.3.0
Public Member Functions | List of all members
mondschein::display::Visual Class Referenceabstract

This class is the Interface class for any rendering visual. More...

#include <visual.h>

Inheritance diagram for mondschein::display::Visual:
mondschein::display::GLFW_Visual mondschein::display::GLUT_Visual mondschein::display::Qt4_Visual mondschein::display::SDL_Visual mondschein::display::SFML_Visual mondschein::display::wx_Visual

Public Member Functions

virtual void set_visual_attribs (const visual_attribs_t &_dsp)
 Set the display properties. More...
 
virtual visual_attribs_t get_visual_attribs () const
 Get the display properties. More...
 
virtual void init ()=0
 Initialize the rendering visual. More...
 
virtual void update ()=0
 Update the rendering visual. More...
 
virtual void make_current ()=0
 Make the visual current. More...
 
virtual void draw ()=0
 Draw the contents of the framebuffer.
 

Detailed Description

This class is the Interface class for any rendering visual.

The Visual class is an abstract base class for every rendering visual.
A rendering visual is the "communications layer" between the GUI toolkit and the framebuffer.
Some GUI toolkits support multi-context rendering enabling a rendering visual to have more than one rendering contexts. In this case additional rendering contexts can be created, destroyed, or switched, but there always must be at least one rendering context available.

NOTE: Visual objects are not copyable so there is neither a copy constructor nor an assignment operator.

Definition at line 42 of file visual.h.

Member Function Documentation

visual_attribs_t Visual::get_visual_attribs ( ) const
virtual

Get the display properties.

Returns
the display properties of *this

Definition at line 47 of file visual.cpp.

virtual void mondschein::display::Visual::init ( )
pure virtual

Initialize the rendering visual.

NOTE: This function must be called before calling the update or draw functions, otherwise the visual behaviour will be undefined.

Implemented in mondschein::display::SDL_Visual, mondschein::display::wx_Visual, mondschein::display::GLUT_Visual, mondschein::display::SFML_Visual, mondschein::display::GLFW_Visual, and mondschein::display::Qt4_Visual.

virtual void mondschein::display::Visual::make_current ( )
pure virtual

Make the visual current.

This function should not be called explicitely, since it is implicitely called by mondschein::Engine::make_current(mondschein::display::Visual_p _v,mondschein::renderer::Context_p _c).

Implemented in mondschein::display::SDL_Visual.

void Visual::set_visual_attribs ( const visual_attribs_t _dsp)
virtual

Set the display properties.

Parameters
_dspthe display properties

Definition at line 41 of file visual.cpp.

virtual void mondschein::display::Visual::update ( )
pure virtual

Update the rendering visual.

NOTE: This function must be called for any changes to take effect.

Implemented in mondschein::display::SDL_Visual, mondschein::display::wx_Visual, mondschein::display::GLUT_Visual, mondschein::display::SFML_Visual, mondschein::display::GLFW_Visual, and mondschein::display::Qt4_Visual.


The documentation for this class was generated from the following files: