|
From: <cn...@us...> - 2009-08-22 21:25:21
|
Revision: 513
http://hgengine.svn.sourceforge.net/hgengine/?rev=513&view=rev
Author: cnlohr
Date: 2009-08-22 21:25:09 +0000 (Sat, 22 Aug 2009)
Log Message:
-----------
allow for printing out of traversal information
Modified Paths:
--------------
Mercury2/src/MercuryNode.cpp
Modified: Mercury2/src/MercuryNode.cpp
===================================================================
--- Mercury2/src/MercuryNode.cpp 2009-08-22 20:21:08 UTC (rev 512)
+++ Mercury2/src/MercuryNode.cpp 2009-08-22 21:25:09 UTC (rev 513)
@@ -186,14 +186,28 @@
}
}
+//#define WRITE_OUT_RENDERGARPH
+
void MercuryNode::RecursiveRender( )
{
- if ( IsHidden() || IsCulled() || (! (m_iPasses & (1<<g_iPass))) ) return;
+#ifdef WRITE_OUT_RENDERGARPH
+ static int depth;
+ if ( IsHidden() || IsCulled() || (! (m_iPasses & (1<<g_iPass))) )
+ {
+ printf( "x%*c %p:%s (%d %d %d)\n", depth, 0, this, GetName().c_str(), IsHidden(), IsCulled(), (! (m_iPasses & (1<<g_iPass))) );
+ return;
+ }
+ printf( "1%*c %p:%s\n", depth, 0, this, GetName().c_str() );
+ depth++;
+#else
+ if ( IsHidden() || IsCulled() || (! (m_iPasses & (1<<g_iPass))) )
+ return;
+#endif
const MercuryMatrix& matrix = GetGlobalMatrix();
const MercuryMatrix& modelView = GetModelViewMatrix(); //get the one computed in the last transform
ShaderAttribute sa;
-
+
//A lot of this stuff could be moved into the transform node, BUT
//the alpha render path requires that all things things happen, so
//it is just easier to leave it here than to duplicate this code in
@@ -219,6 +233,10 @@
Shader::SetAttribute("HG_ModelMatrix", sa);
PostRender( modelView ); //calls on children assets
+
+#ifdef WRITE_OUT_RENDERGARPH
+ depth--;
+#endif
}
void MercuryNode::ThreadedUpdate(float dTime)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|