Commit bbf0b7e3 authored by Jan Möbius's avatar Jan Möbius
Browse files

Extended BaseNode for the new style rendering

refs #901



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14713 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e70742e6
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
namespace ACG { namespace ACG {
class IRenderer;
namespace SceneGraph { namespace SceneGraph {
...@@ -168,9 +171,28 @@ public: ...@@ -168,9 +171,28 @@ public:
*/ */
virtual void enter(GLState& /*_state */, const DrawModes::DrawMode& /*_drawMode*/ ) {} virtual void enter(GLState& /*_state */, const DrawModes::DrawMode& /*_drawMode*/ ) {}
/** Draw this node using the draw modes _drawMode */ /** \brief Draw this node using the draw modes _drawMode
*
* This function is called when the scenegraph is traversed by the classical draw routines.
*
* In this call the node should draw it's content via OpenGL.
*
* \note Keep in mind, that you should use
* the currently active state and don't change it (at least reset it the original values you got).
* Otherwise nodes that are drawn after this node might get an inconsistent state.
*/
virtual void draw(GLState& /* _state */, const DrawModes::DrawMode& /* _drawMode */) {} virtual void draw(GLState& /* _state */, const DrawModes::DrawMode& /* _drawMode */) {}
/** \brief Deferred draw call with shader based renderer.
*
* The renderer calls this function to collect the geometry that should be rendered from the nodes.
*
* Add any renderable geometry to the renderer via _renderer->addRenderObject()
*
* \note You should not draw anything yourself in this function.
*/
virtual void draw2(IRenderer* /*_renderer*/, GLState& /* _state */, const DrawModes::DrawMode& /* _drawMode */) {}
/** The leave function is used to restore GL states the have been changed. /** The leave function is used to restore GL states the have been changed.
This function must restore the status before enter() ! This function must restore the status before enter() !
*/ */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment