- Timestamp:
- 08/19/08 11:38:08 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.cpp
r2850 r2851 88 88 { 89 89 mCullFaceEnabled = true; 90 //glEnable(GL_CULL_FACE);90 glEnable(GL_CULL_FACE); 91 91 } 92 92 … … 94 94 { 95 95 mAlphaTestEnabled = false; 96 glDisable(GL_ALPHA_TEST); 96 97 // not needed with GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 98 //glDisable(GL_ALPHA_TEST); 99 glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); 97 100 } 98 101 else if (!mAlphaTestEnabled && alphaTest) 99 102 { 100 103 mAlphaTestEnabled = true; 101 glEnable(GL_ALPHA_TEST); 104 105 // not needed with GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 106 //glEnable(GL_ALPHA_TEST); 107 glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); 102 108 } 103 109 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp
r2850 r2851 69 69 70 70 // hack 71 distance = i * 20;71 //if (i >= 3) distance = 30000; 72 72 73 73 int numShapes; 74 74 str.read(reinterpret_cast<char *>(&numShapes), sizeof(int)); 75 75 76 //if (numLODs > 1) cout << "dist: " << distance << " shapes: " << numShapes ;76 //if (numLODs > 1) cout << "dist: " << distance << " shapes: " << numShapes << endl; 77 77 78 78 LODLevel *lodLevel = new LODLevel(distance); … … 94 94 lodLevel->AddShape(shape); 95 95 } 96 97 //if (numLODs > 1) cout << endl;98 96 99 97 sceneGeom->AddLODLevel(lodLevel); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2850 r2851 376 376 glutInitWindowSize(winWidth, winHeight); 377 377 glutInit(&argc, argv); 378 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_MULTISAMPLE); 378 //glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_MULTISAMPLE); 379 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); 379 380 380 381 //glutInitDisplayString("samples=2"); … … 402 403 InitGLstate(); 403 404 404 glEnable(GL_MULTISAMPLE_ARB); 405 glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); 406 glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); 405 //glEnable(GL_MULTISAMPLE_ARB); 406 //glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); 407 407 408 408 InitFBO(); … … 869 869 glFrontFace(GL_CCW); 870 870 glCullFace(GL_BACK); 871 //glEnable(GL_CULL_FACE);872 873 glDisable(GL_CULL_FACE);871 glEnable(GL_CULL_FACE); 872 873 //glDisable(GL_CULL_FACE); 874 874 glDisable(GL_TEXTURE_2D); 875 875 … … 1138 1138 case RenderState::FIXED: 1139 1139 1140 glEnable(GL_MULTISAMPLE_ARB); 1141 //glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); 1142 1140 1143 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 1141 1144 … … 1153 1156 1154 1157 case RenderState::DEPTH_PASS: 1158 1159 glEnable(GL_MULTISAMPLE_ARB); 1160 //glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); 1161 1155 1162 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 1156 1163 … … 1170 1177 1171 1178 case RenderState::DEFERRED: 1179 1180 // multisampling not working with deferred shading 1181 //glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); 1182 glDisable(GL_MULTISAMPLE_ARB); 1183 1172 1184 state.SetRenderType(RenderState::DEFERRED); 1173 1185 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
r2837 r2851 84 84 pix.pos.w = IN.projPos.w; 85 85 86 if (pix.col.w < 0. 9f)86 if (pix.col.w < 0.5f) 87 87 discard; 88 88
Note: See TracChangeset
for help on using the changeset viewer.