Changeset 7741 in orxonox.OLD for branches/water/src
- Timestamp:
- May 20, 2006, 11:56:55 AM (18 years ago)
- Location:
- branches/water/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/water/src/story_entities/game_world.cc
r7740 r7741 443 443 void GameWorld::display () 444 444 { 445 // clear buffer446 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);447 448 445 // render the reflection texture 449 446 this->renderPassReflection(); … … 477 474 void GameWorld::renderPassReflection() 478 475 { 476 // clear buffer 477 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 478 479 479 const std::list<BaseObject*>* reflectedWaters; 480 480 MappedWater* mw; … … 518 518 void GameWorld::renderPassAll() 519 519 { 520 // clear buffer 521 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 520 522 GraphicsEngine* engine = GraphicsEngine::getInstance(); 521 523 -
branches/water/src/world_entities/environments/mapped_water.cc
r7740 r7741 111 111 { 112 112 glPushAttrib(GL_VIEWPORT_BIT); 113 glPushMatrix();113 // glPushMatrix(); 114 114 115 //glLoadIdentity(); 115 116 glViewport(0,0, textureSize, textureSize); 116 117 118 117 119 // Clear the color and depth bits, reset the matrix and position our camera. 118 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 119 glLoadIdentity(); 120 120 121 //g_Camera.Look(); 121 122 … … 159 160 glDisable(GL_CLIP_PLANE0); 160 161 }*/ 162 } 161 163 162 // Restore the previous matrix163 //glPopMatrix();164 165 // Bind the current scene to our reflection texture166 //glBindTexture(GL_TEXTURE_2D, g_Texture[REFLECTION_ID]);167 168 169 170 171 }172 164 173 165 void MappedWater::deactivateReflection() 174 166 { 175 glBindTexture(GL_TEXTURE_2D, texture.getTexture());167 //glBindTexture(GL_TEXTURE_2D, texture.getTexture()); 176 168 177 mat.setDiffuseMap(&texture, 0); 169 //mat.setDiffuseMap(&texture, 0); 170 mat.select(); 178 171 glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize); 179 172 173 180 174 glPopAttrib(); 181 glPopMatrix();175 // glPopMatrix(); 182 176 } 183 177
Note: See TracChangeset
for help on using the changeset viewer.