- Timestamp:
- Jun 20, 2006, 3:12:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/water/src/world_entities/environments/mapped_water.cc
r8630 r8632 166 166 167 167 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 169 169 glRotatef(this->waterAngle, 0, 1, 0); 170 170 … … 185 185 glMultiTexCoord2f(GL_TEXTURE2, 0, normalUV + move2); // Normal map texture 186 186 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); 188 188 189 189 // The front left vertice for the water … … 192 192 glMultiTexCoord2f(GL_TEXTURE2, 0, move2); // Normal map texture 193 193 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); 195 195 196 196 // The front right vertice for the water … … 199 199 glMultiTexCoord2f(GL_TEXTURE2, normalUV, move2); // Normal map texture 200 200 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); 202 202 203 203 // The back right vertice for the water … … 206 206 glMultiTexCoord2f(GL_TEXTURE2, normalUV, normalUV + move2); // Normal map texture 207 207 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); 209 209 glEnd(); 210 210
Note: See TracChangeset
for help on using the changeset viewer.