Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8587 in orxonox.OLD for branches/water


Ignore:
Timestamp:
Jun 19, 2006, 5:07:22 PM (19 years ago)
Author:
stefalie
Message:

water: refl- and refr.bmp aint needes anymore, thx bensch, only one lil problem: somehow the textures have an alpha value… but i a glDisable(GL_BLEND) it works fine

File:
1 edited

Legend:

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

    r8586 r8587  
    3535    this->loadParams(root);
    3636
    37 
    38 this->textureSize = 512;
     37  /// loads the textures
     38  // sets parameters for the textures
     39  this->textureSize = 512;
    3940  unsigned int channels = 32;
    4041  GLenum type = GL_RGBA;
    41   /// loads the textures
    4242  // set up refleciton texture
    43   //Texture reflTex(GL_TEXTURE_2D, this->textureSize, this->textureSize, channels, type);
    44   //mat.setDiffuseMap(reflTex, 0);
    45   mat.setDiffuseMap("pictures/refl.bmp", GL_TEXTURE_2D, 0);
     43  Texture reflTex(GL_TEXTURE_2D, this->textureSize, this->textureSize, channels, type);
     44  mat.setDiffuseMap(reflTex, 0);
     45  //mat.setDiffuseMap("pictures/refl.bmp", GL_TEXTURE_2D, 0);
    4646  // load refraction texture
    47   //Texture refrTex(GL_TEXTURE_2D, this->textureSize, this->textureSize, channels, type);
    48   //mat.setDiffuseMap(refrTex, 1);
    49   mat.setDiffuseMap("pictures/refr.bmp", GL_TEXTURE_2D, 1);
     47  Texture refrTex(GL_TEXTURE_2D, this->textureSize, this->textureSize, channels, type);
     48  mat.setDiffuseMap(refrTex, 1);
     49  //mat.setDiffuseMap("pictures/refr.bmp", GL_TEXTURE_2D, 1);
    5050  // load normal map
    5151  mat.setDiffuseMap("pictures/normalmap.bmp", GL_TEXTURE_2D, 2);
     
    194194  cam_uni->set(pos.x, pos.y, pos.z, 1.0f);
    195195
     196  glDisable(GL_BLEND);
     197
    196198  glBegin(GL_QUADS);
    197199  // The back left vertice for the water
Note: See TracChangeset for help on using the changeset viewer.