Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8488 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 15, 2006, 6:19:27 PM (18 years ago)
Author:
stefalie
Message:

water: some cleanup and some cleandown :-)

Location:
branches/water/src/world_entities
Files:
2 edited

Legend:

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

    r8484 r8488  
    3535    this->loadParams(root);
    3636
     37
     38this->textureSize = 512;
     39  unsigned int channels = 32;
     40  GLenum type = GL_RGBA;
    3741  /// loads the textures
    3842  // 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);
    4045  mat.setDiffuseMap("pictures/refl.bmp", GL_TEXTURE_2D, 0);
    4146  // load refraction texture
     
    4954
    5055
    51 
    52   /// MAKE THE MAPPING TEXTURE.
    53   // THIS IS A HACK AND SHOULD BE IN TEXTURE SOMEWHERE
    5456  // 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
    5663  //unsigned int channels = 32;
    5764  //GLenum type = GL_RGBA;
     
    7279  //glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(1));
    7380  //glTexImage2D(GL_TEXTURE_2D, 0, channels, this->textureSize, this->textureSize, 0, type, GL_UNSIGNED_INT, pTextureRefraction);
    74 
     81/*
    7582  unsigned int channels = 32;
    7683  GLenum type = GL_RGBA;
    7784  unsigned int* pTextureReflection = new unsigned int [this->textureSize * this->textureSize * channels];
    7885  memset(pTextureReflection, 0, this->textureSize * this->textureSize * channels * sizeof(unsigned int));
    79   //mat.select();
     86  //mat.select();*/
    8087  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0));
    8188  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
     
    8390  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    8491  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));
    9097  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(1));
    9198  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
     
    93100  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    94101  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);
    96103
    97104  // Set the texture quality
     
    101108  //delete [] pTextureReflection;
    102109  //delete [] pTextureRefraction;
    103 
    104 
    105   /// initialization of the texture coords, speeds etc...
    106   this->move = 0.0f;
    107   this->kNormalMapScale = 0.25f;
    108110
    109111
  • branches/water/src/world_entities/space_ships/hover.cc

    r8362 r8488  
    9999  //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
    100100  this->setClassID(CL_HOVER, "Hover");
     101  this->toReflectionList();
    101102
    102103  this->loadModel("models/ships/hoverglider_wing.obj", 1.0f, 3);
Note: See TracChangeset for help on using the changeset viewer.