Mondschein Engine
0.3.0
|
This class represents the renderer interface. More...
#include <renderer.h>
Public Member Functions | |
virtual void | set_context (Context_p _c) |
Set the rendering context. More... | |
virtual Context_p | get_context () const |
Get the rendering context. More... | |
virtual void | toggle_feature (const std::string &_feature, bool _state)=0 |
Toggle renderer features. More... | |
virtual bool | query_extension (const std::string &_ext) |
Queries OpenGL extension availablity. More... | |
virtual void | set_clear_color (const Eigen::Vector4d &_c)=0 |
Set the clear color. More... | |
virtual void | clear_color_buffer ()=0 |
Clear the color buffer. | |
virtual void | clear_depth_buffer ()=0 |
Clear the depth buffer. | |
virtual std::string | id () const =0 |
Get the renderer ID. More... | |
virtual void | make_renderable (scene::Scenenode_c _sn)=0 |
Make a scene node renderable. More... | |
virtual void | render (scene::Scenegraph_c _sg, const uint32 _start)=0 |
Render a scenegraph. More... | |
This class represents the renderer interface.
The renderer is the part of the Mondschein Engine creating the actual 2D-image out of the given data. Thus it is the only part allowed to pass rendering commands to the graphics hardware.
The Renderer interface class represents the common base of any renderer implementation of the "Mondschein Engine".
Definition at line 42 of file renderer.h.
|
virtual |
Get the rendering context.
This member returns the rendering context.
Definition at line 42 of file renderer.cpp.
|
pure virtual |
Get the renderer ID.
This member function uniquely identifies the renderer class type. This ID string also defines the OpenGL version implemented in this renderer.
Implemented in mondschein::renderer::GL13.
|
pure virtual |
Make a scene node renderable.
_sn | the scene node object |
This member function makes the scenenode renderable within the current context
Implemented in mondschein::renderer::GL13.
Definition at line 136 of file renderer.cpp.
|
virtual |
Queries OpenGL extension availablity.
_ext | the extension name |
Definition at line 65 of file renderer.cpp.
|
pure virtual |
Render a scenegraph.
_sg | the scenegraph object |
Implemented in mondschein::renderer::GL13.
Definition at line 153 of file renderer.cpp.
|
pure virtual |
Set the clear color.
_color | the clear color value |
Implemented in mondschein::renderer::GL13.
Definition at line 85 of file renderer.cpp.
|
virtual |
Set the rendering context.
_c | the rendering context |
If | the renderer and _c are incompatible |
This member function sets _c as its rendering context and checks if it is compatible to the renderer. If not, an exception is thrown.
Definition at line 37 of file renderer.cpp.
|
pure virtual |
Toggle renderer features.
_feature | the feature string |
_state | the feature state (ON or OFF) |
mondschein::exception | if the feature is not found or supported |
Implemented in mondschein::renderer::GL13.
Definition at line 47 of file renderer.cpp.