3 #ifndef SCENEVIEW_RENDERER_HPP__
4 #define SCENEVIEW_RENDERER_HPP__
11 #include <sceneview/scene.hpp>
12 #include <sceneview/resource_manager.hpp>
80 explicit Renderer(
const QString& name, QObject* parent = 0);
89 const QString&
Name()
const {
return name_; }
196 void EnableChanged(
bool enabled);
199 void SetEnabled(
bool enabled);
205 virtual void OnEnableChanged(
bool enabled) {}
208 friend class Viewport;
210 void SetViewport(Viewport* viewport);
212 void SetBaseNode(GroupNode* node);
218 GroupNode* base_node_;
225 #endif // SCENEVIEW_RENDERER_HPP__
A scene graph node that can have children.
Definition: group_node.hpp:26
virtual void ShutdownGL()
Override this to release any OpenGL resources acquired by the renderer.
Definition: renderer.hpp:164
const QString & Name() const
Retrieve the renderer name.
Definition: renderer.hpp:89
ResourceManager::Ptr GetResources()
Retrieve the ResourceManager for the scene.
bool Enabled() const
Definition: renderer.hpp:179
Scene::Ptr GetScene()
Retrieve the Scene graph used by the Sceneview rendering engine.
virtual void RenderEnd()
Called at the end of rendering, just after the scene has finished rendering.
Definition: renderer.hpp:156
Subclass this to add content in the scene and draw things.
Definition: renderer.hpp:73
Viewport * GetViewport()
Retrieve the viewport that manages this renderer.
Definition: renderer.hpp:94
Renderer(const QString &name, QObject *parent=0)
Construct a new renderer with the specified name.
virtual void InitializeGL()
Override to acquire OpenGL resources required by the Renderer.
Definition: renderer.hpp:126
Widget that draws a scene and manages Renderer and InputHandler objects.
Definition: viewport.hpp:27
virtual void LoadState(const QVariant &val)
Called by the viewport to restore the renderer state.
Definition: renderer.hpp:193
virtual QWidget * GetWidget()
Override this to provide a custom UI for your renderer.
Definition: renderer.hpp:169
virtual QVariant SaveState()
Called by the viewport to save the renderer state.
Definition: renderer.hpp:186
GroupNode * GetBaseNode()
Retrieve the group node assigned to this renderer.
virtual void RenderBegin()
Called at the start of rendering, just before the scene is rendered.
Definition: renderer.hpp:149