Changeset 3039
- Timestamp:
- 10/17/08 17:07:44 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.cpp
r3038 r3039 73 73 void Material::Render(RenderState *state) 74 74 { 75 state->SetState(this);76 77 75 glMaterialfv(GL_FRONT, GL_AMBIENT, (float *)&mAmbientColor.r); 78 76 glMaterialfv(GL_FRONT, GL_DIFFUSE, (float *)&mDiffuseColor.r); 79 77 glMaterialfv(GL_FRONT, GL_EMISSION, (float *)&mEmmisiveColor.r); 80 78 glMaterialfv(GL_FRONT, GL_SPECULAR, (float *)&mSpecularColor.r); 79 80 state->SetState(this); 81 81 } 82 82 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.cpp
r3038 r3039 65 65 glDisableClientState(GL_TEXTURE_COORD_ARRAY); 66 66 67 //ResourceManager::GetSingleton()->DisableFragmentProfile();68 //ResourceManager::GetSingleton()->DisableVertexProfile();67 ResourceManager::GetSingleton()->DisableFragmentProfile(); 68 ResourceManager::GetSingleton()->DisableVertexProfile(); 69 69 } 70 70 … … 194 194 { 195 195 mCurrentFragmentProgram = mat->GetFragmentProgram(); 196 mCurrentFragmentProgram->Bind(); 196 mCurrentFragmentProgram->Bind(); 197 197 } 198 198 … … 203 203 if (mat->GetVertexProgram()) 204 204 { 205 if 205 if (mat->GetVertexProgram() != mCurrentVertexProgram) 206 206 { 207 207 mCurrentVertexProgram = mat->GetVertexProgram(); 208 208 mCurrentVertexProgram->Bind(); 209 209 } 210 210 211 211 mat->GetVertexProgramParameters()->UpdateParameters(); 212 212 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp
r3038 r3039 420 420 421 421 mMrtDefaultVertexProgram = CreateVertexProgram("mrt", "vtx"); 422 mMrtDefaultFragmentProgram = CreateFragmentProgram("mrt", "frag tex");//CreateFragmentProgram("mrt", "frag");422 mMrtDefaultFragmentProgram = CreateFragmentProgram("mrt", "frag"); 423 423 mMrtDefaultFragmentTexProgram = CreateFragmentProgram("mrt", "fragtex"); 424 424 mMrtDefaultFragmentTexProgram->AddParameter("tex", 0); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SkyPreetham.cpp
r3038 r3039 138 138 } 139 139 140 mSkyDome->GetShape(0)->GetMaterial()->GetVertexProgramParameters()->UpdateParameters(); 141 mSkyDome->GetShape(0)->GetMaterial()->GetVertexProgram()->Bind(); 142 140 143 // Render sky dome. 141 144 mSkyDome->Render(state); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3038 r3039 1900 1900 glViewport(0, 0, texWidth, texHeight); 1901 1901 1902 state.Reset(); 1902 1903 InitDeferredRendering(); 1903 1904 } … … 1906 1907 glEnable(GL_LIGHTING); 1907 1908 state.SetRenderPassType(RenderState::FIXED); 1909 state.Reset(); 1908 1910 } 1909 1911 … … 1918 1920 1919 1921 state.SetUseAlphaToCoverage(true); 1920 state.Reset();1922 1921 1923 1922 1924 //cout << "visible: " << (int)traverser->GetVisibleObjects().size() << endl;
Note: See TracChangeset
for help on using the changeset viewer.