Changeset 8821 in orxonox.OLD for branches/mountain_lake/src
- Timestamp:
- Jun 27, 2006, 12:40:05 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mountain_lake/src/world_entities/environments/mapped_water.cc
r8792 r8821 104 104 mat.setDiffuseMap(refrTex, 1); 105 105 // load normal map 106 mat.setDiffuseMap("pictures/ normalmap.bmp", GL_TEXTURE_2D, 2);106 mat.setDiffuseMap("pictures/water_normalmap.bmp", GL_TEXTURE_2D, 2); 107 107 // load dudv map 108 mat.setDiffuseMap("pictures/ dudvmap.bmp", GL_TEXTURE_2D, 3);108 mat.setDiffuseMap("pictures/water_dudvmap.bmp", GL_TEXTURE_2D, 3); 109 109 110 110 // sets texture parameters for reflection texture … … 247 247 glBegin(GL_QUADS); 248 248 // The back left vertice for the water 249 glMultiTexCoord2f(GL_TEXTURE0, 0, waterUV); // Reflection texture250 glMultiTexCoord2f(GL_TEXTURE1, 0, waterUV - move); // Refraction texture251 glMultiTexCoord2f(GL_TEXTURE2, 0, normalUV + move2); // Normal map texture252 glMultiTexCoord2f(GL_TEXTURE3, 0, 0); // DUDV map texture249 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 253 253 glVertex3f(this->waterPos.x, this->waterPos.y, this->waterPos.z); 254 254 255 255 // The front left vertice for the water 256 glMultiTexCoord2f(GL_TEXTURE0, 0, 0); // Reflection texture257 glMultiTexCoord2f(GL_TEXTURE1, 0, -move); // Refraction texture258 glMultiTexCoord2f(GL_TEXTURE2, 0, move2); // Normal map texture259 glMultiTexCoord2f(GL_TEXTURE3, 0, 0); // DUDV map texture256 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 260 260 glVertex3f(this->waterPos.x, this->waterPos.y, this->waterPos.z + this->zWidth); 261 261 262 262 // The front right vertice for the water 263 glMultiTexCoord2f(GL_TEXTURE0, waterUV, 0); // Reflection texture264 glMultiTexCoord2f(GL_TEXTURE1, waterUV, -move); // Refraction texture265 glMultiTexCoord2f(GL_TEXTURE2, normalUV, move2); // Normal map texture266 glMultiTexCoord2f(GL_TEXTURE3, 0, 0); // DUDV map texture263 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 267 267 glVertex3f(this->waterPos.x + this->xWidth, this->waterPos.y, this->waterPos.z + this->zWidth); 268 268 269 269 // The back right vertice for the water 270 glMultiTexCoord2f(GL_TEXTURE0, waterUV, waterUV); // Reflection texture271 glMultiTexCoord2f(GL_TEXTURE1, waterUV, waterUV - move); 272 glMultiTexCoord2f(GL_TEXTURE2, normalUV, normalUV + move2); // Normal map texture273 glMultiTexCoord2f(GL_TEXTURE3, 0, 0); // DUDV map texture270 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 274 274 glVertex3f(this->waterPos.x + this->xWidth, this->waterPos.y, this->waterPos.z); 275 275 glEnd();
Note: See TracChangeset
for help on using the changeset viewer.