Changeset 3067
- Timestamp:
- 10/24/08 13:24:10 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.cpp
r3066 r3067 142 142 mFbo = new FrameBufferObject(size, size, FrameBufferObject::DEPTH_32, true); 143 143 144 // need a color buffer to keep openglhappy144 // need a color buffer to keep driver happy 145 145 mFbo->AddColorBuffer(ColorBufferObject::RGB_UBYTE, 146 146 ColorBufferObject::WRAP_CLAMP_TO_EDGE, 147 147 ColorBufferObject::FILTER_NEAREST); 148 148 149 150 149 mShadowCam = new PerspectiveCamera(1); 151 //mShadowCam->SetOrtho(true);152 150 } 153 151 … … 598 596 glViewport(0, 0, mSize, mSize); 599 597 600 //glDisable(GL_LIGHTING); 601 //glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 602 598 glDisable(GL_LIGHTING); 599 glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 603 600 glShadeModel(GL_FLAT); 604 601 … … 612 609 613 610 glShadeModel(GL_SMOOTH); 614 //glEnable(GL_LIGHTING);615 //glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);611 glEnable(GL_LIGHTING); 612 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 616 613 617 614 #if 0 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3066 r3067 923 923 // the scene is rendered withouth any shading 924 924 glShadeModel(GL_FLAT); 925 //glDisable(GL_LIGHTING);926 //glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);925 glDisable(GL_LIGHTING); 926 glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 927 927 928 928 … … 935 935 state.SetRenderTechnique(RenderState::DEPTH_PASS); 936 936 937 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 938 937 939 // the scene is rendered withouth any shading 938 940 glShadeModel(GL_FLAT); 939 941 glDisable(GL_LIGHTING); 940 941 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 942 //glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 942 glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 943 943 944 944 … … 1880 1880 } 1881 1881 1882 glDisable(GL_LIGHTING);1883 1882 glViewport(0, 0, texWidth, texHeight); 1884 1883 // rese the state before the final visible objects pass … … 1888 1887 else 1889 1888 { 1890 glEnable(GL_LIGHTING);1891 1889 state.SetRenderTechnique(RenderState::FORWARD); 1892 1890 // rese the state before the final visible objects pass … … 1894 1892 } 1895 1893 1894 glEnableClientState(GL_NORMAL_ARRAY); 1895 1896 1896 glShadeModel(GL_SMOOTH); 1897 glEnableClientState(GL_NORMAL_ARRAY);1898 1899 1897 // draw all objects that have exactly the same depth as the current sample 1900 1898 glDepthFunc(GL_LEQUAL); 1899 1901 1900 //glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 1902 1901 state.SetUseAlphaToCoverage(true); 1902 // clear color 1903 1903 glClear(GL_COLOR_BUFFER_BIT); 1904 1905 state.SetUseAlphaToCoverage(true);1906 1904 1907 1905
Note: See TracChangeset
for help on using the changeset viewer.