Mondschein Engine
0.3.0
|
This class is the Interface class for any rendering visual. More...
#include <visual.h>
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. | |
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.
|
virtual |
Get the display properties.
Definition at line 47 of file visual.cpp.
|
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.
|
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.
|
virtual |
Set the display properties.
_dsp | the display properties |
Definition at line 41 of file visual.cpp.
|
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.