Changeset 9882 in orxonox.OLD for trunk/src/lib/graphics/importer
- Timestamp:
- Oct 12, 2006, 8:25:16 AM (18 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r9869 r9882 81 81 LoadParam(root, "tex", this, Material, setDiffuseMap); 82 82 LoadParam(root, "blendfunc", this, Material, setBlendFuncS) 83 83 .defaultValues("ZERO", "ZERO"); 84 84 } 85 85 … … 123 123 for(unsigned int i = 0; i < Material::selectedMaterial->textures.size(); ++i) 124 124 { 125 glActiveTexture(Material::glTextureArbs[i]); 125 if (GLEW_ARB_multitexture) 126 glActiveTexture(Material::glTextureArbs[i]); 126 127 //glBindTexture(GL_TEXTURE_2D, 0); 127 128 glDisable(GL_TEXTURE_2D); … … 159 160 for(unsigned int i = 0; i < this->textures.size(); ++i) 160 161 { 161 glActiveTexture(Material::glTextureArbs[i]); 162 if (GLEW_ARB_multitexture) 163 glActiveTexture(Material::glTextureArbs[i]); 162 164 glEnable(GL_TEXTURE_2D); 163 165 if(this->textures[i].hasAlpha()) … … 311 313 { 312 314 this->textures[textureNumber] = ResourceTexture(dMap); 313 314 /* if (tex != NULL)315 this->textures[textureNumber] = tex;316 else317 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();*/ 318 320 } 319 321 else … … 438 440 439 441 const 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_TEXTURE7449 };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 }; 450 452 451 453 -
trunk/src/lib/graphics/importer/texture.h
r9869 r9882 50 50 static void setTextureEnableState(bool texturesEnabled); 51 51 /** @returns true if Textures are enabled */ 52 inlinestatic bool getTextureEnableState() { return Texture::texturesEnabled; };52 static bool getTextureEnableState() { return Texture::texturesEnabled; }; 53 53 // Utility functionality: 54 54 static SDL_Surface* prepareSurface(SDL_Surface* input, bool& hasAlpha);
Note: See TracChangeset
for help on using the changeset viewer.