Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8632 in orxonox.OLD


Ignore:
Timestamp:
Jun 20, 2006, 3:12:48 PM (18 years ago)
Author:
stefalie
Message:

water: mighty reflection is still at the wrong place

File:
1 edited

Legend:

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

    r8630 r8632  
    166166
    167167  glPushMatrix();
    168   glTranslatef(this->waterPos.x ,0 ,this->waterPos.z);
     168  // don't use a glTranslate here, the reflection point won't be at the right place anymore
    169169  glRotatef(this->waterAngle, 0, 1, 0);
    170170
     
    185185  glMultiTexCoord2f(GL_TEXTURE2, 0, normalUV + move2);     // Normal map texture
    186186  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                       // DUDV map texture
    187   glVertex3f(0, this->waterPos.y, 0);
     187  glVertex3f(this->waterPos.x, this->waterPos.y, this->waterPos.z);
    188188
    189189  // The front left vertice for the water
     
    192192  glMultiTexCoord2f(GL_TEXTURE2, 0, move2);          // Normal map texture
    193193  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
    194   glVertex3f(0, this->waterPos.y, this->zWidth);
     194  glVertex3f(this->waterPos.x, this->waterPos.y, this->waterPos.z + this->zWidth);
    195195
    196196  // The front right vertice for the water
     
    199199  glMultiTexCoord2f(GL_TEXTURE2, normalUV, move2);      // Normal map texture
    200200  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
    201   glVertex3f(this->xWidth, this->waterPos.y, this->zWidth);
     201  glVertex3f(this->waterPos.x + this->xWidth, this->waterPos.y, this->waterPos.z + this->zWidth);
    202202
    203203  // The back right vertice for the water
     
    206206  glMultiTexCoord2f(GL_TEXTURE2, normalUV, normalUV + move2);  // Normal map texture
    207207  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
    208   glVertex3f(this->xWidth, this->waterPos.y, 0);
     208  glVertex3f(this->waterPos.x + this->xWidth, this->waterPos.y, this->waterPos.z);
    209209  glEnd();
    210210
Note: See TracChangeset for help on using the changeset viewer.