Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9882 in orxonox.OLD


Ignore:
Timestamp:
Oct 12, 2006, 8:25:16 AM (15 years ago)
Author:
bensch
Message:

trunk: gl_multi_texture check in the material. This should resolve the Material::select() bug

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/material.cc

    r9869 r9882  
    8181  LoadParam(root, "tex", this, Material, setDiffuseMap);
    8282  LoadParam(root, "blendfunc", this, Material, setBlendFuncS)
    83       .defaultValues("ZERO", "ZERO");
     83  .defaultValues("ZERO", "ZERO");
    8484}
    8585
     
    123123    for(unsigned int i = 0; i < Material::selectedMaterial->textures.size(); ++i)
    124124    {
    125       glActiveTexture(Material::glTextureArbs[i]);
     125      if (GLEW_ARB_multitexture)
     126        glActiveTexture(Material::glTextureArbs[i]);
    126127      //glBindTexture(GL_TEXTURE_2D, 0);
    127128      glDisable(GL_TEXTURE_2D);
     
    159160  for(unsigned int i = 0; i < this->textures.size(); ++i)
    160161  {
    161     glActiveTexture(Material::glTextureArbs[i]);
     162    if (GLEW_ARB_multitexture)
     163      glActiveTexture(Material::glTextureArbs[i]);
    162164    glEnable(GL_TEXTURE_2D);
    163165    if(this->textures[i].hasAlpha())
     
    311313  {
    312314    this->textures[textureNumber] = ResourceTexture(dMap);
    313         //dynamic_cast<Texture*>(ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target));
    314 /*    if (tex != NULL)
    315       this->textures[textureNumber] = tex;
    316     else
    317       this->textures[textureNumber] = Texture();*/
     315    //dynamic_cast<Texture*>(ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target));
     316    /*    if (tex != NULL)
     317          this->textures[textureNumber] = tex;
     318        else
     319          this->textures[textureNumber] = Texture();*/
    318320  }
    319321  else
     
    438440
    439441const GLenum Material::glTextureArbs[] =
    440 {
    441   GL_TEXTURE0,
    442   GL_TEXTURE1,
    443   GL_TEXTURE2,
    444   GL_TEXTURE3,
    445   GL_TEXTURE4,
    446   GL_TEXTURE5,
    447   GL_TEXTURE6,
    448   GL_TEXTURE7
    449 };
     442  {
     443    GL_TEXTURE0,
     444    GL_TEXTURE1,
     445    GL_TEXTURE2,
     446    GL_TEXTURE3,
     447    GL_TEXTURE4,
     448    GL_TEXTURE5,
     449    GL_TEXTURE6,
     450    GL_TEXTURE7
     451  };
    450452
    451453
  • trunk/src/lib/graphics/importer/texture.h

    r9869 r9882  
    5050  static void setTextureEnableState(bool texturesEnabled);
    5151  /** @returns true if Textures are enabled */
    52   inline static bool getTextureEnableState() { return Texture::texturesEnabled; };
     52  static bool getTextureEnableState() { return Texture::texturesEnabled; };
    5353  // Utility functionality:
    5454  static SDL_Surface* prepareSurface(SDL_Surface* input, bool& hasAlpha);
  • trunk/src/world_entities/environments/mapped_water.cc

    r9869 r9882  
    165165{
    166166  // load shader files
    167   shader = ResourceShader( "/shaders/mapped_water.vert", "/shaders/mapped_water.frag");
     167  shader = ResourceShader( "shaders/mapped_water.vert", "shaders/mapped_water.frag");
    168168
    169169  this->shader.activateShader();
Note: See TracChangeset for help on using the changeset viewer.