Changeset 8488 in orxonox.OLD for branches/water
- Timestamp:
- Jun 15, 2006, 6:19:27 PM (19 years ago)
- Location:
- branches/water/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/water/src/world_entities/environments/mapped_water.cc
r8484 r8488 35 35 this->loadParams(root); 36 36 37 38 this->textureSize = 512; 39 unsigned int channels = 32; 40 GLenum type = GL_RGBA; 37 41 /// loads the textures 38 42 // set up refleciton texture 39 //mat.setDiffuseMap(this->texture, 0); 43 //Texture texture(GL_TEXTURE_2D, this->textureSize, this->textureSize, channels, type); 44 //mat.setDiffuseMap(texture, 0); 40 45 mat.setDiffuseMap("pictures/refl.bmp", GL_TEXTURE_2D, 0); 41 46 // load refraction texture … … 49 54 50 55 51 52 /// MAKE THE MAPPING TEXTURE.53 // THIS IS A HACK AND SHOULD BE IN TEXTURE SOMEWHERE54 56 // set the size of the refraction and reflection textures 55 this->textureSize = 512; 57 58 59 // initialization of the texture coords, speeds etc... 60 this->move = 0.0f; 61 this->kNormalMapScale = 0.25f; 62 56 63 //unsigned int channels = 32; 57 64 //GLenum type = GL_RGBA; … … 72 79 //glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(1)); 73 80 //glTexImage2D(GL_TEXTURE_2D, 0, channels, this->textureSize, this->textureSize, 0, type, GL_UNSIGNED_INT, pTextureRefraction); 74 81 /* 75 82 unsigned int channels = 32; 76 83 GLenum type = GL_RGBA; 77 84 unsigned int* pTextureReflection = new unsigned int [this->textureSize * this->textureSize * channels]; 78 85 memset(pTextureReflection, 0, this->textureSize * this->textureSize * channels * sizeof(unsigned int)); 79 //mat.select(); 86 //mat.select();*/ 80 87 glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0)); 81 88 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); … … 83 90 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 84 91 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 85 glTexImage2D(GL_TEXTURE_2D, 0, channels, this->textureSize, this->textureSize, 0, type, GL_UNSIGNED_INT, pTextureReflection);86 87 88 unsigned int* pTextureRefraction = new unsigned int [this->textureSize * this->textureSize * channels];89 memset(pTextureRefraction, 0, this->textureSize * this->textureSize * channels * sizeof(unsigned int));92 //glTexImage2D(GL_TEXTURE_2D, 0, channels, this->textureSize, this->textureSize, 0, type, GL_UNSIGNED_INT, pTextureReflection); 93 94 95 //unsigned int* pTextureRefraction = new unsigned int [this->textureSize * this->textureSize * channels]; 96 //memset(pTextureRefraction, 0, this->textureSize * this->textureSize * channels * sizeof(unsigned int)); 90 97 glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(1)); 91 98 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); … … 93 100 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 94 101 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 95 glTexImage2D(GL_TEXTURE_2D, 0, channels, this->textureSize, this->textureSize, 0, type, GL_UNSIGNED_INT, pTextureRefraction);102 //glTexImage2D(GL_TEXTURE_2D, 0, channels, this->textureSize, this->textureSize, 0, type, GL_UNSIGNED_INT, pTextureRefraction); 96 103 97 104 // Set the texture quality … … 101 108 //delete [] pTextureReflection; 102 109 //delete [] pTextureRefraction; 103 104 105 /// initialization of the texture coords, speeds etc...106 this->move = 0.0f;107 this->kNormalMapScale = 0.25f;108 110 109 111 -
branches/water/src/world_entities/space_ships/hover.cc
r8362 r8488 99 99 // this->setRelDir(Quaternion(M_PI, Vector(1,0,0))); 100 100 this->setClassID(CL_HOVER, "Hover"); 101 this->toReflectionList(); 101 102 102 103 this->loadModel("models/ships/hoverglider_wing.obj", 1.0f, 3);
Note: See TracChangeset
for help on using the changeset viewer.