Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 15, 2006, 4:08:15 PM (18 years ago)
Author:
stefalie
Message:

water: widths of the water quad are saved in the xml file

File:
1 edited

Legend:

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

    r8473 r8477  
    151151  WorldEntity::loadParams(root);
    152152
    153   LoadParam(root, "waterPos", this, MappedWater, setWaterPos);
    154   LoadParam(root, "lightPos", this, MappedWater, setLightPosition);
     153  LoadParam(root, "waterpos", this, MappedWater, setWaterPos);
     154  LoadParam(root, "watersize", this, MappedWater, setWaterSize);
     155  LoadParam(root, "lightpos", this, MappedWater, setLightPosition);
    155156}
    156157
     
    183184  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                       // DUDV map texture
    184185  //glMultiTexCoord2f(GL_TEXTURE4, 0, 0);                       // Depth texture
    185   glVertex3f(0.0f, waterPos.y, 0.0f);
     186  glVertex3f(0.0f, this->waterPos.y, 0.0f);
    186187
    187188  // The front left vertice for the water
     
    193194  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
    194195  //glMultiTexCoord2f(GL_TEXTURE4, 0, 0);                        // Depth texture
    195   glVertex3f(0.0f, waterPos.y, 1000.0f);
     196  glVertex3f(0.0f, this->waterPos.y, this->zWidth);
    196197
    197198  // The front right vertice for the water
     
    203204  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
    204205  //glMultiTexCoord2f(GL_TEXTURE4, 0, 0);                        // Depth texture
    205   glVertex3f(1000.0f, waterPos.y, 1000.0f);
     206  glVertex3f(this->xWidth, this->waterPos.y, this->zWidth);
    206207
    207208  // The back right vertice for the water
     
    213214  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
    214215  //glMultiTexCoord2f(GL_TEXTURE4, 0, 0);                        // Depth texture
    215   glVertex3f(1000.0f, waterPos.y, 0.0f);
     216  glVertex3f(this->xWidth, this->waterPos.y, 0.0f);
    216217  glEnd();
    217218
Note: See TracChangeset for help on using the changeset viewer.