|
From: <cn...@us...> - 2009-08-18 05:20:15
|
Revision: 483
http://hgengine.svn.sourceforge.net/hgengine/?rev=483&view=rev
Author: cnlohr
Date: 2009-08-18 05:20:06 +0000 (Tue, 18 Aug 2009)
Log Message:
-----------
remove the traversal method we're not using
Modified Paths:
--------------
Mercury2/src/Viewport.cpp
Modified: Mercury2/src/Viewport.cpp
===================================================================
--- Mercury2/src/Viewport.cpp 2009-08-16 16:44:49 UTC (rev 482)
+++ Mercury2/src/Viewport.cpp 2009-08-18 05:20:06 UTC (rev 483)
@@ -18,135 +18,6 @@
{
}
-void Viewport::GoAll( const float fDtime )
-{
- MercuryNode * n;
- int depth = 0;
-
- if( NeedsRebuild() )
- {
- printf( "Xxxx\n" );
- }
-
- //Update pass
- n = this;
- while( n )
- {
- n->Update( fDtime );
- n = n->TraversalNextNode( this, depth );
- }
-
- //Prerender pass
- n = this;
- while( n )
- {
- //If we're hidden, skip to the next traversable element
- if( n->IsHidden() )
- {
- //Make sure we have a next sibling...
- while( n && n != this && !n->NextSibling() )
- {
- depth--;
- n = n->Parent();
- }
-
- if( !n || n == this )
- break;
-
- n = n->NextSibling();
- }
-
-
- const MercuryMatrix& matrix = n->FindGlobalMatrix();
-
- TransformNode * tn = dynamic_cast< TransformNode * >( n );
- if( tn )
- tn->HandleMatrixOperations();
-
- n->PreRender( matrix );
-
- if( n->Parent() )
- n->Parent()->SetCulled( n->Parent()->IsCulled() && n->IsCulled() );
-
- //Traverse next
-/*
- MercuryNode * ret;
- if( ret = n->FirstChild() )
- {
- depth++;
- n = ret;
- }
- else if( ret = n->NextSibling() )
- n = ret;
- else if( ret = n->Parent() )
- {
- depth--;
-
- while( ret && ret != this && !ret->NextSibling() )
- {
- depth--;
- ret = ret->Parent();
- }
-
- if( !ret || ret == this )
- return 0;
-
- n = ret->m_nextSibling;
- }
- else
- return 0;
-*/
-
- n = n->TraversalNextNode( this, depth );
- }
-
- n = this;
- while( n )
- {
- if( n->IsHidden() || IsCulled() )
- {
- //Make sure we have a next sibling...
- while( n && n != this && !n->NextSibling() )
- {
- depth--;
- n = n->Parent();
- }
-
- if( !n || n == this )
- break;
-
- n = n->NextSibling();
- }
-
- const MercuryMatrix& matrix = n->FindGlobalMatrix();
- const MercuryMatrix& modelView = n->FindModelViewMatrix(); //get the one computed in the last transform
-
- glLoadMatrix( modelView );
-
- ShaderAttribute sa;
- sa.type = ShaderAttribute::TYPE_MATRIX;
- sa.value.matrix = matrix.Ptr();
- Shader::SetAttribute("HG_ModelMatrix", sa);
-
- if ( n->m_useAlphaPath )
- CURRENTRENDERGRAPH->AddAlphaNode(n);
- else
- n->Render( modelView );
-
- glLoadMatrix( modelView );
- Shader::SetAttribute("HG_ModelMatrix", sa);
-
- if ( !n->m_useAlphaPath )
- n->PostRender( modelView );
-
- n = n->TraversalNextNode( this, depth );
- }
-
- this->PostRender( FindModelViewMatrix() );
-
-}
-
-
void Viewport::PreRender(const MercuryMatrix& matrix)
{
FRUSTUM = &m_frustum;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|