Changeset 2978 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
- Timestamp:
- 09/26/08 22:36:20 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2977 r2978 924 924 cgGLEnableProfile(RenderState::sCgFragmentProfile); 925 925 cgGLBindProgram(RenderState::sCgMrtFragmentProgram); 926 927 // draw to 3 color buffers 928 // a color, normal, and positions buffer 929 if (sCurrentMrtSet == 0) 930 { 931 DeferredRenderer::colorBufferIdx = 0; 932 glDrawBuffers(3, mrt); 933 } 934 else 935 { 936 DeferredRenderer::colorBufferIdx = 3; 937 glDrawBuffers(3, mrt2); 938 } 939 sCurrentMrtSet = 1 - sCurrentMrtSet; 926 940 } 927 941 … … 1051 1065 InitDeferredRendering(); 1052 1066 1053 // draw to 3 color buffers1054 // a color, normal, and positions buffer1055 if (sCurrentMrtSet == 0)1056 {1057 DeferredRenderer::colorBufferIdx = 0;1058 glDrawBuffers(3, mrt);1059 }1060 else1061 {1062 DeferredRenderer::colorBufferIdx = 3;1063 glDrawBuffers(3, mrt2);1064 }1065 sCurrentMrtSet = 1 - sCurrentMrtSet;1066 1067 1067 glEnableClientState(GL_NORMAL_ARRAY); 1068 1068 … … 2024 2024 InitDeferredRendering(); 2025 2025 2026 // draw to 3 color buffers2027 glDrawBuffers(3, mrt);2028 2026 glClear(GL_COLOR_BUFFER_BIT); 2029 2027 }
Note: See TracChangeset
for help on using the changeset viewer.