|
From: <axl...@us...> - 2009-04-01 02:22:31
|
Revision: 193
http://hgengine.svn.sourceforge.net/hgengine/?rev=193&view=rev
Author: axlecrusher
Date: 2009-04-01 01:57:21 +0000 (Wed, 01 Apr 2009)
Log Message:
-----------
update
Modified Paths:
--------------
Mercury2/src/MercuryNode.cpp
Modified: Mercury2/src/MercuryNode.cpp
===================================================================
--- Mercury2/src/MercuryNode.cpp 2009-04-01 01:25:21 UTC (rev 192)
+++ Mercury2/src/MercuryNode.cpp 2009-04-01 01:57:21 UTC (rev 193)
@@ -94,9 +94,8 @@
{
Update(dTime);
- list< MercuryNode* >::iterator i;
- for (i = m_children.begin(); i != m_children.end(); ++i )
- (*i)->RecursiveUpdate(dTime);
+ for (MercuryNode* child = FirstChild(); child != NULL; child = NextChild(child))
+ child->RecursiveUpdate(dTime);
}
void MercuryNode::ThreadedUpdate(float dTime)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2009-06-21 02:07:07
|
Revision: 354
http://hgengine.svn.sourceforge.net/hgengine/?rev=354&view=rev
Author: axlecrusher
Date: 2009-06-21 02:07:05 +0000 (Sun, 21 Jun 2009)
Log Message:
-----------
use faster methods
Modified Paths:
--------------
Mercury2/src/MercuryNode.cpp
Modified: Mercury2/src/MercuryNode.cpp
===================================================================
--- Mercury2/src/MercuryNode.cpp 2009-06-21 01:54:13 UTC (rev 353)
+++ Mercury2/src/MercuryNode.cpp 2009-06-21 02:07:05 UTC (rev 354)
@@ -125,9 +125,8 @@
Render( modelView ); //calls on children assets
//call render on other render graph entries under me
- std::list< MercuryNode* >::iterator i;
- for (i = m_children.begin(); i != m_children.end(); ++i )
- (*i)->RecursiveRender();
+ for (MercuryNode* child = FirstChild(); child != NULL; child = NextChild(child))
+ child->RecursiveRender();
glLoadMatrixf( modelView.Ptr() );
Shader::SetAttribute("HG_ModelMatrix", sa);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2009-08-18 05:39:58
|
Revision: 488
http://hgengine.svn.sourceforge.net/hgengine/?rev=488&view=rev
Author: cnlohr
Date: 2009-08-18 05:39:50 +0000 (Tue, 18 Aug 2009)
Log Message:
-----------
fix dissappearing textures and assets. The problem is that we're
ignoring if we're actually culled or not, and just letting whatever
happen.
Modified Paths:
--------------
Mercury2/src/MercuryNode.cpp
Modified: Mercury2/src/MercuryNode.cpp
===================================================================
--- Mercury2/src/MercuryNode.cpp 2009-08-18 05:24:42 UTC (rev 487)
+++ Mercury2/src/MercuryNode.cpp 2009-08-18 05:39:50 UTC (rev 488)
@@ -277,7 +277,11 @@
MercuryAsset& a = mai.Asset();
if ( !a.ExcludeFromCull() )
culled = culled && mai.Culled( a.DoCullingTests( mai.GetOcclusionResult(), matrix ) );
- if ( !mai.Culled() ) a.PreRender(this);
+ if ( !mai.Culled() )
+ {
+ culled = false;
+ a.PreRender(this);
+ }
}
SetCulled( culled );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2009-08-22 16:10:39
|
Revision: 509
http://hgengine.svn.sourceforge.net/hgengine/?rev=509&view=rev
Author: cnlohr
Date: 2009-08-22 16:10:33 +0000 (Sat, 22 Aug 2009)
Log Message:
-----------
make use of the new StrToBool function
Modified Paths:
--------------
Mercury2/src/MercuryNode.cpp
Modified: Mercury2/src/MercuryNode.cpp
===================================================================
--- Mercury2/src/MercuryNode.cpp 2009-08-22 16:04:58 UTC (rev 508)
+++ Mercury2/src/MercuryNode.cpp 2009-08-22 16:10:33 UTC (rev 509)
@@ -192,19 +192,18 @@
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
//RenderGraph::RenderAlpha
+
GLCALL( glLoadMatrix( modelView ) );
-
- ShaderAttribute sa;
sa.type = ShaderAttribute::TYPE_MATRIX;
sa.value.matrix = matrix.Ptr();
Shader::SetAttribute("HG_ModelMatrix", sa);
-
+
Render( modelView ); //calls on children assets
//call render on other render graph entries under me
@@ -218,6 +217,7 @@
GLCALL( glLoadMatrix( modelView ) );
Shader::SetAttribute("HG_ModelMatrix", sa);
+
PostRender( modelView ); //calls on children assets
}
@@ -236,10 +236,10 @@
SetName( node.Attribute("name") );
if ( !node.Attribute("hidden").empty() )
- m_hidden = node.Attribute("hidden")=="true"?true:false;
+ m_hidden = StrToBool( node.Attribute("hidden") );
if ( !node.Attribute("alphaPath").empty() )
- m_useAlphaPath = node.Attribute("alphaPath")=="true"?true:false;
+ m_useAlphaPath = StrToBool( node.Attribute("alphaPath") );
//Not much to do here except run through all the children nodes
for (XMLNode child = node.Child(); child.IsValid(); child = child.NextNode())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <cn...@us...> - 2009-08-24 17:11:08
|
Revision: 523
http://hgengine.svn.sourceforge.net/hgengine/?rev=523&view=rev
Author: cnlohr
Date: 2009-08-24 17:10:52 +0000 (Mon, 24 Aug 2009)
Log Message:
-----------
add initializers and fix FindChild
Modified Paths:
--------------
Mercury2/src/MercuryNode.cpp
Modified: Mercury2/src/MercuryNode.cpp
===================================================================
--- Mercury2/src/MercuryNode.cpp 2009-08-23 13:10:21 UTC (rev 522)
+++ Mercury2/src/MercuryNode.cpp 2009-08-24 17:10:52 UTC (rev 523)
@@ -16,7 +16,8 @@
MercuryNode::MercuryNode()
:m_parent(NULL), m_prevSibling(NULL),
m_nextSibling(NULL), m_hidden(false),
- m_useAlphaPath(false), m_culled(false)
+ m_useAlphaPath(false), m_culled(false),
+ m_iPasses( DEFAULT_PASSES ), m_iForcePasses( 0 )
{
}
@@ -119,7 +120,7 @@
MercuryNode * ret;
if( ( ret = (*i)->FindChild( sNameOfNode, depth - 1 ) ) )
{
- if( (*i)->GetName().compare( sNameOfNode ) == 0 )
+ if( ret )
return ret;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2009-11-05 03:50:24
|
Revision: 600
http://hgengine.svn.sourceforge.net/hgengine/?rev=600&view=rev
Author: cnlohr
Date: 2009-11-05 03:01:56 +0000 (Thu, 05 Nov 2009)
Log Message:
-----------
whoops forgot to take out debug
Modified Paths:
--------------
Mercury2/src/MercuryNode.cpp
Modified: Mercury2/src/MercuryNode.cpp
===================================================================
--- Mercury2/src/MercuryNode.cpp 2009-11-05 02:59:30 UTC (rev 599)
+++ Mercury2/src/MercuryNode.cpp 2009-11-05 03:01:56 UTC (rev 600)
@@ -376,7 +376,6 @@
mai->Culled( a.DoCullingTests( mai->GetOcclusionResult(), matrix ) );
culled = culled && mai->Culled();
}
- printf( "CULL: %s (%d) %d\n", mai->Asset().GetType(), a.IgnoreCull(), mai->Culled() );
if ( !mai->Culled() ) a.PreRender(this);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2009-11-09 00:48:45
|
Revision: 609
http://hgengine.svn.sourceforge.net/hgengine/?rev=609&view=rev
Author: axlecrusher
Date: 2009-11-09 00:48:35 +0000 (Mon, 09 Nov 2009)
Log Message:
-----------
fix uninitalized variables
Modified Paths:
--------------
Mercury2/src/MercuryNode.cpp
Modified: Mercury2/src/MercuryNode.cpp
===================================================================
--- Mercury2/src/MercuryNode.cpp 2009-11-08 23:15:45 UTC (rev 608)
+++ Mercury2/src/MercuryNode.cpp 2009-11-09 00:48:35 UTC (rev 609)
@@ -21,6 +21,8 @@
m_useAlphaPath(false), m_culled(false),
m_iPasses( DEFAULT_PASSES ), m_iForcePasses( 0 )
{
+ m_pGlobalMatrix = &MercuryMatrix::Identity();
+ m_pModelViewMatrix = &MercuryMatrix::Identity();
}
MercuryNode::~MercuryNode()
@@ -468,7 +470,7 @@
}
bool MercuryNode::m_rebuildRenderGraph = false;
-__ThreadLocalStore int g_iViewportID;
+__ThreadLocalStore int g_iViewportID = 0;
__ThreadLocalStore int g_iPass;
/****************************************************************************
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|