Changeset 8235 in orxonox.OLD
- Timestamp:
- Jun 8, 2006, 1:32:36 PM (18 years ago)
- Location:
- branches/water/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/water/src/story_entities/game_world.cc
r8095 r8235 132 132 133 133 imageSelector->pack(slider); 134 slider->setValue(getImage("/home/stefalie/svn/orxonox/data/trunk/pictures/ dudvmap.bmp"));134 slider->setValue(getImage("/home/stefalie/svn/orxonox/data/trunk/pictures/refl.bmp")); 135 135 } 136 136 imageSelector->showAll(); -
branches/water/src/world_entities/environments/mapped_water.cc
r8095 r8235 40 40 // set up refleciton texture 41 41 //mat.setDiffuseMap(this->texture, 0); 42 mat.setDiffuseMap("pictures/refl. jpg", GL_TEXTURE_2D, 0);42 mat.setDiffuseMap("pictures/refl.bmp", GL_TEXTURE_2D, 0); 43 43 // load refraction texture 44 mat.setDiffuseMap("pictures/refr. jpg", GL_TEXTURE_2D, 1);44 mat.setDiffuseMap("pictures/refr.bmp", GL_TEXTURE_2D, 1); 45 45 // load normal map 46 46 mat.setDiffuseMap("pictures/normalmap.bmp", GL_TEXTURE_2D, 2); … … 74 74 //glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(1)); 75 75 //glTexImage2D(GL_TEXTURE_2D, 0, channels, this->textureSize, this->textureSize, 0, type, GL_UNSIGNED_INT, pTextureRefraction); 76 77 unsigned int channels = 32; 78 GLenum type = GL_RGBA; 79 unsigned int* pTextureReflection = new unsigned int [this->textureSize * this->textureSize * channels]; 80 memset(pTextureReflection, 0, this->textureSize * this->textureSize * channels * sizeof(unsigned int)); 81 mat.select(); 82 glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0)); 83 glTexImage2D(GL_TEXTURE_2D, 0, channels, this->textureSize, this->textureSize, 0, type, GL_UNSIGNED_INT, pTextureReflection); 84 85 86 76 87 77 88 // Set the texture quality … … 252 263 253 264 mat.select(); 254 //glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize); 255 mat.renderToTexture(0, GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize); 256 265 /////glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize); 266 ///mat.renderToTexture(0, GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize); 267 /// 268 269 mat.select(); 270 glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0)); 271 272 // Create the texture and store it on the video card 273 glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize); 274 275 276 /// 257 277 glPopMatrix(); 258 278 glPopAttrib(); … … 301 321 302 322 mat.select(); 303 mat.renderToTexture(1, GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);323 //mat.renderToTexture(1, GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize); 304 324 //glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 0, 0, textureSize, textureSize, 0); 305 325 //mat.renderToTexture(0, GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 0, textureSize, textureSize, 0);
Note: See TracChangeset
for help on using the changeset viewer.