Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7741 in orxonox.OLD for branches/water/src


Ignore:
Timestamp:
May 20, 2006, 11:56:55 AM (18 years ago)
Author:
patrick
Message:

water: i think i eliminated some more bugs. the texture now displayed is strange… it's a simple texture. perhaps bensch knows what happened here :D

Location:
branches/water/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/water/src/story_entities/game_world.cc

    r7740 r7741  
    443443void GameWorld::display ()
    444444{
    445   // clear buffer
    446   glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
    447 
    448445  // render the reflection texture
    449446  this->renderPassReflection();
     
    477474void GameWorld::renderPassReflection()
    478475{
     476    // clear buffer
     477  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
     478
    479479  const std::list<BaseObject*>* reflectedWaters;
    480480  MappedWater* mw;
     
    518518void GameWorld::renderPassAll()
    519519{
     520  // clear buffer
     521  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
    520522  GraphicsEngine* engine = GraphicsEngine::getInstance();
    521523
  • branches/water/src/world_entities/environments/mapped_water.cc

    r7740 r7741  
    111111{
    112112  glPushAttrib(GL_VIEWPORT_BIT);
    113   glPushMatrix();
     113//   glPushMatrix();
    114114
     115  //glLoadIdentity();
    115116  glViewport(0,0, textureSize, textureSize);
    116117
     118
    117119  // 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
    120121  //g_Camera.Look();
    121122
     
    159160      glDisable(GL_CLIP_PLANE0);
    160161  }*/
     162}
    161163
    162   // Restore the previous matrix
    163   //glPopMatrix();
    164 
    165     // Bind the current scene to our reflection texture
    166   //glBindTexture(GL_TEXTURE_2D, g_Texture[REFLECTION_ID]);
    167 
    168 
    169 
    170 
    171 }
    172164
    173165void MappedWater::deactivateReflection()
    174166{
    175   glBindTexture(GL_TEXTURE_2D, texture.getTexture());
     167  //glBindTexture(GL_TEXTURE_2D, texture.getTexture());
    176168
    177   mat.setDiffuseMap(&texture, 0);
     169  //mat.setDiffuseMap(&texture, 0);
     170  mat.select();
    178171  glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);
    179172
     173
    180174  glPopAttrib();
    181   glPopMatrix();
     175//   glPopMatrix();
    182176}
    183177
Note: See TracChangeset for help on using the changeset viewer.