Changeset 3118 for GTP/trunk/App/Demos
- Timestamp:
- 11/11/08 16:22:02 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3117 r3118 72 72 73 73 74 int DeferredRenderer::colorBufferIdx = 3;74 int DeferredRenderer::colorBufferIdx = 0; 75 75 76 76 … … 519 519 GLuint oldTex = mIllumFbo->GetColorBuffer(2 - mIllumFboIndex)->GetTexture(); 520 520 521 cout << colorBufferIdx;522 523 521 glPushAttrib(GL_VIEWPORT_BIT); 524 522 glViewport(0, 0, mIllumFbo->GetWidth(), mIllumFbo->GetHeight()); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3117 r3118 463 463 //-- load some dynamic stuff 464 464 465 /*LoadModel("hbuddha.dem", dynamicObjects);465 LoadModel("hbuddha.dem", dynamicObjects); 466 466 buddha = dynamicObjects.back(); 467 467 … … 487 487 dynamicObjects.push_back(ent); 488 488 } 489 */ 489 490 490 491 491 /////////// … … 522 522 preetham = new SkyPreetham(turbitiy, skyDome); 523 523 524 //CreateAnimation();524 CreateAnimation(); 525 525 526 526 … … 883 883 // draw to 3 color buffers 884 884 // a color, normal, and positions buffer 885 DeferredRenderer::colorBufferIdx = 3 - DeferredRenderer::colorBufferIdx; 886 if (sCurrentMrtSet == 0) glDrawBuffers(3, mrt); 887 else glDrawBuffers(3, mrt2); 885 if (sCurrentMrtSet == 0) 886 { 887 DeferredRenderer::colorBufferIdx = 0; 888 glDrawBuffers(3, mrt); 889 } 890 else 891 { 892 DeferredRenderer::colorBufferIdx = 3; 893 glDrawBuffers(3, mrt2); 894 } 888 895 889 896 sCurrentMrtSet = 1 - sCurrentMrtSet; … … 895 902 void MainLoop() 896 903 { 897 /*GPUProgramParameters *vtxParams =904 GPUProgramParameters *vtxParams = 898 905 buddha->GetShape(0)->GetMaterial()->GetTechnique(1)->GetVertexProgramParameters(); 899 906 … … 908 915 dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 909 916 910 */ 917 911 918 ///////////// 912 919 … … 1136 1143 1137 1144 ///////////////////////// 1138 1139 /*//motionPath->Move(0.3f); 1145 //-- update animations 1140 1146 motionPath->Move(0.01f); 1141 Vector3 oldBuddhaPos = buddhaPos;1142 // new position1143 buddhaPos = motionPath->GetCurrentPosition();1144 1145 Vector3 diff = oldBuddhaPos - buddhaPos;1146 //Vector3 diff = buddhaPos - oldBuddhaPos;1147 1148 invTrafo = TranslationMatrix(diff);1149 //cout<< "diff " << diff << endl;1150 */1151 1147 } 1152 1148 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
r3117 r3118 63 63 // transform the vertex position into post projection space 64 64 OUT.position = mul(glstate.matrix.mvp, IN.position); 65 // the normal has to be correctly transformed with the inverse transpose66 OUT.normal = mul(glstate.matrix.invtrans.modelview[0], IN.normal);67 65 // transform the old vertex position into world space 68 66 OUT.worldPos = mul(modelMatrix, IN.position); 69 67 // transform the old vertex position into world space 70 68 OUT.oldWorldPos = mul(oldModelMatrix, IN.position); 71 69 // the normal has to be correctly transformed with the inverse transpose 70 OUT.normal = mul(glstate.matrix.invtrans.modelview[0], IN.normal); 71 72 72 return OUT; 73 73 }
Note: See TracChangeset
for help on using the changeset viewer.