|
|
@@ -25,12 +25,9 @@ texture_t normal_fai, diffuse_fai, specular_fai, depth_fai;
|
|
|
|
|
|
|
|
|
|
|
|
-/*
|
|
|
-=======================================================================================================================================
|
|
|
-Init =
|
|
|
-init FBO =
|
|
|
-=======================================================================================================================================
|
|
|
-*/
|
|
|
+//=====================================================================================================================================
|
|
|
+// Init =
|
|
|
+//=====================================================================================================================================
|
|
|
void Init()
|
|
|
{
|
|
|
// create FBO
|
|
|
@@ -71,11 +68,9 @@ void Init()
|
|
|
}
|
|
|
|
|
|
|
|
|
-/*
|
|
|
-=======================================================================================================================================
|
|
|
-RunStage =
|
|
|
-=======================================================================================================================================
|
|
|
-*/
|
|
|
+//=====================================================================================================================================
|
|
|
+// RunStage =
|
|
|
+//=====================================================================================================================================
|
|
|
void RunStage( const camera_t& cam )
|
|
|
{
|
|
|
#if defined( _EARLY_Z_ )
|
|
|
@@ -101,12 +96,13 @@ void RunStage( const camera_t& cam )
|
|
|
#endif
|
|
|
|
|
|
// render the meshes
|
|
|
- for( uint i=0; i<scene::meshes.size(); i++ )
|
|
|
- Render<mesh_node_t, false>( scene::meshes[i] );
|
|
|
-
|
|
|
- // render the smodels
|
|
|
- for( uint i=0; i<scene::smodels.size(); i++ )
|
|
|
- Render<smodel_t, false>( scene::smodels[i] );
|
|
|
+ for( uint i=0; i<scene::mesh_nodes.size(); i++ )
|
|
|
+ {
|
|
|
+ mesh_node_t* mesh_node = scene::mesh_nodes[0];
|
|
|
+ if( mesh_node->material->blends ) continue;
|
|
|
+ mesh_node->material->Setup();
|
|
|
+ mesh_node->Render();
|
|
|
+ }
|
|
|
|
|
|
glPolygonMode( GL_FRONT, GL_FILL ); // the rendering above fucks the polygon mode
|
|
|
|