Commit 5fc620e2 authored by Jan Möbius's avatar Jan Möbius

Fixed order of material settings, as the node itself can be a material node. refs #1286

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15855 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b2e9e25c
......@@ -113,14 +113,15 @@ void Renderer::traverseRenderableNodes( GLState* _glState, SceneGraph::DrawModes
_node->enter(*_glState, _drawMode);
if (_node->status() != SceneGraph::BaseNode::HideNode)
_node->getRenderObjects(this, *_glState, nodeDM, _mat);
// fetch material
// fetch material (Node itself can be a material node, so we have to
// set that in front of the nodes own rendering
SceneGraph::MaterialNode* matNode = dynamic_cast<SceneGraph::MaterialNode*>(_node);
if (matNode)
_mat = &matNode->material();
if (_node->status() != SceneGraph::BaseNode::HideNode)
_node->getRenderObjects(this, *_glState, nodeDM, _mat);
if (process_children)
{
......
......@@ -182,9 +182,9 @@ protected:
/**
Dump list of renderobjects to text file.
Dump list of render objects to text file.
@param _fileName name of text file to write to
@param _sortedList dump sorted renderobjects in order, may be 0 to use the unsorted list instead
@param _sortedList dump sorted render objects in order, may be 0 to use the unsorted list instead
*/
void dumpRenderObjectsToText(const char* _fileName, ACG::RenderObject** _sortedList = 0) const;
......
Markdown is supported
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