Changeset 3066 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
- Timestamp:
- 10/24/08 13:17:03 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
r3065 r3066 200 200 201 201 // nodes are tested using the subnodes from 3 levels below 202 mMaxDepthForTestingChildren = 0;//3;202 mMaxDepthForTestingChildren = 3; 203 203 //mMaxDepthForTestingChildren = 4; 204 204 … … 1109 1109 1110 1110 1111 static 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 1111 1127 void Bvh::RenderBoundsForViz(BvhNode *node, 1112 1128 RenderState *state, 1113 1129 bool useTightBounds) 1114 1130 { 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(); 1123 1134 boxMat.Render(state); 1124 1135 1125 1136 if (!useTightBounds) 1126 1137 { 1127 //RenderBoxForViz(node->GetBox());1128 glPolygonMode(GL_FRONT, GL_LINE);1138 RenderBoxForViz(node->GetBox()); 1139 /*glPolygonMode(GL_FRONT, GL_LINE); 1129 1140 RenderBoundingBoxImmediate(node->GetBox()); 1130 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 1141 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);*/ 1131 1142 } 1132 1143 else … … 1137 1148 } 1138 1149 } 1150 1151 if (oldTech) oldTech->Render(state); 1139 1152 } 1140 1153
Note: See TracChangeset
for help on using the changeset viewer.