Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8821 in orxonox.OLD for branches/mountain_lake/src


Ignore:
Timestamp:
Jun 27, 2006, 12:40:05 PM (18 years ago)
Author:
stefalie
Message:

water: minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mountain_lake/src/world_entities/environments/mapped_water.cc

    r8792 r8821  
    104104  mat.setDiffuseMap(refrTex, 1);
    105105  // load normal map
    106   mat.setDiffuseMap("pictures/normalmap.bmp", GL_TEXTURE_2D, 2);
     106  mat.setDiffuseMap("pictures/water_normalmap.bmp", GL_TEXTURE_2D, 2);
    107107  // load dudv map
    108   mat.setDiffuseMap("pictures/dudvmap.bmp", GL_TEXTURE_2D, 3);
     108  mat.setDiffuseMap("pictures/water_dudvmap.bmp", GL_TEXTURE_2D, 3);
    109109
    110110  // sets texture parameters for reflection texture
     
    247247  glBegin(GL_QUADS);
    248248  // The back left vertice for the water
    249   glMultiTexCoord2f(GL_TEXTURE0, 0, waterUV);            // Reflection texture
    250   glMultiTexCoord2f(GL_TEXTURE1, 0, waterUV - move);        // Refraction texture
    251   glMultiTexCoord2f(GL_TEXTURE2, 0, normalUV + move2);     // Normal map texture
    252   glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                       // DUDV map texture
     249  glMultiTexCoord2f(GL_TEXTURE0, 0, waterUV);                   // Reflection texture
     250  glMultiTexCoord2f(GL_TEXTURE1, 0, waterUV - move);            // Refraction texture
     251  glMultiTexCoord2f(GL_TEXTURE2, 0, normalUV + move2);          // Normal map texture
     252  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
    253253  glVertex3f(this->waterPos.x, this->waterPos.y, this->waterPos.z);
    254254
    255255  // The front left vertice for the water
    256   glMultiTexCoord2f(GL_TEXTURE0, 0, 0);                  // Reflection texture
    257   glMultiTexCoord2f(GL_TEXTURE1, 0, -move);           // Refraction texture
    258   glMultiTexCoord2f(GL_TEXTURE2, 0, move2);          // Normal map texture
    259   glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
     256  glMultiTexCoord2f(GL_TEXTURE0, 0, 0);                         // Reflection texture
     257  glMultiTexCoord2f(GL_TEXTURE1, 0, -move);                     // Refraction texture
     258  glMultiTexCoord2f(GL_TEXTURE2, 0, move2);                     // Normal map texture
     259  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
    260260  glVertex3f(this->waterPos.x, this->waterPos.y, this->waterPos.z + this->zWidth);
    261261
    262262  // The front right vertice for the water
    263   glMultiTexCoord2f(GL_TEXTURE0, waterUV, 0);             // Reflection texture
    264   glMultiTexCoord2f(GL_TEXTURE1, waterUV, -move);         // Refraction texture
    265   glMultiTexCoord2f(GL_TEXTURE2, normalUV, move2);      // Normal map texture
    266   glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
     263  glMultiTexCoord2f(GL_TEXTURE0, waterUV, 0);                   // Reflection texture
     264  glMultiTexCoord2f(GL_TEXTURE1, waterUV, -move);               // Refraction texture
     265  glMultiTexCoord2f(GL_TEXTURE2, normalUV, move2);              // Normal map texture
     266  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
    267267  glVertex3f(this->waterPos.x + this->xWidth, this->waterPos.y, this->waterPos.z + this->zWidth);
    268268
    269269  // The back right vertice for the water
    270   glMultiTexCoord2f(GL_TEXTURE0, waterUV, waterUV);        // Reflection texture
    271   glMultiTexCoord2f(GL_TEXTURE1, waterUV, waterUV - move);       // Refraction texture
    272   glMultiTexCoord2f(GL_TEXTURE2, normalUV, normalUV + move2);  // Normal map texture
    273   glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
     270  glMultiTexCoord2f(GL_TEXTURE0, waterUV, waterUV);             // Reflection texture
     271  glMultiTexCoord2f(GL_TEXTURE1, waterUV, waterUV - move);      // Refraction texture
     272  glMultiTexCoord2f(GL_TEXTURE2, normalUV, normalUV + move2);   // Normal map texture
     273  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
    274274  glVertex3f(this->waterPos.x + this->xWidth, this->waterPos.y, this->waterPos.z);
    275275  glEnd();
Note: See TracChangeset for help on using the changeset viewer.