Ignore:
Timestamp:
10/24/08 13:17:03 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp

    r3065 r3066  
    200200         
    201201        // nodes are tested using the subnodes from 3 levels below 
    202         mMaxDepthForTestingChildren = 0;//3; 
     202        mMaxDepthForTestingChildren = 3; 
    203203        //mMaxDepthForTestingChildren = 4; 
    204204 
     
    11091109 
    11101110 
     1111static Technique GetVizTechnique() 
     1112{ 
     1113        Technique tech; 
     1114        tech.Init(); 
     1115 
     1116        //tech.SetLightingEnabled(false); 
     1117        //tech.SetDepthWriteEnabled(false); 
     1118 
     1119        tech.SetEmmisive(RgbaColor(1.0f, 1.0f, 1.0f, 1.0f)); 
     1120        tech.SetDiffuse(RgbaColor(1.0f, 1.0f, 1.0f, 1.0f)); 
     1121        tech.SetAmbient(RgbaColor(1.0f, 1.0f, 1.0f, 1.0f)); 
     1122 
     1123        return tech; 
     1124} 
     1125 
     1126 
    11111127void Bvh::RenderBoundsForViz(BvhNode *node,  
    11121128                                                         RenderState *state,  
    11131129                                                         bool useTightBounds) 
    11141130{ 
    1115         glColor3f(1, 1, 1); 
    1116  
    1117         // hack: for deferred shading we have to define a material 
    1118         static Technique boxMat; 
    1119         boxMat.SetLightingEnabled(false); 
    1120  
    1121         boxMat.SetEmmisive(RgbaColor(1.0f, 1.0f, 1.0f, 1.0f)); 
    1122  
     1131        Technique *oldTech = state->GetState(); 
     1132        // we set a simple material 
     1133        static Technique boxMat = GetVizTechnique(); 
    11231134        boxMat.Render(state); 
    11241135 
    11251136        if (!useTightBounds) 
    11261137        { 
    1127                 //RenderBoxForViz(node->GetBox()); 
    1128                 glPolygonMode(GL_FRONT, GL_LINE); 
     1138                RenderBoxForViz(node->GetBox()); 
     1139                /*glPolygonMode(GL_FRONT, GL_LINE); 
    11291140                RenderBoundingBoxImmediate(node->GetBox()); 
    1130                 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 
     1141                glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);*/ 
    11311142        } 
    11321143        else 
     
    11371148                } 
    11381149        } 
     1150 
     1151        if (oldTech) oldTech->Render(state); 
    11391152} 
    11401153 
Note: See TracChangeset for help on using the changeset viewer.