Changeset 7919 in orxonox.OLD for trunk/src/lib/graphics/importer
- Timestamp:
- May 28, 2006, 3:48:13 PM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r7848 r7919 108 108 return true; 109 109 110 111 // setting diffuse color 110 if (likely(Material::selectedMaterial != NULL)) 111 { 112 for(unsigned int i = 0; i < Material::selectedMaterial->textures.size(); ++i) 113 { 114 glActiveTexture(Material::glTextureArbs[i]); 115 //glBindTexture(GL_TEXTURE_2D, 0); 116 glDisable(GL_TEXTURE_2D); 117 } 118 } 119 120 // setting diffuse color 112 121 glColor4f (diffuse[0], diffuse[1], diffuse[2], this->transparency); 113 122 // setting ambient color … … 118 127 glMaterialf(GL_FRONT, GL_SHININESS, this->shininess); 119 128 120 121 129 // setting the transparency 122 130 if (this->transparency < 1.0 || /* This allows alpha blending of 2D textures with the scene */ … … 138 146 glShadeModel(GL_SMOOTH); 139 147 140 if (likely(Material::selectedMaterial != NULL))141 {142 for(unsigned int i = 0; i < Material::selectedMaterial->textures.size(); ++i)143 {144 glActiveTexture(Material::glTextureArbs[i]);145 glBindTexture(GL_TEXTURE_2D, 0);146 glDisable(GL_TEXTURE_2D);147 }148 }149 148 150 149 for(unsigned int i = 0; i < this->textures.size(); ++i) … … 159 158 } 160 159 Material::selectedMaterial = this; 161 162 /* if (this->diffuseTexture != NULL)163 {164 glEnable(GL_TEXTURE_2D);165 glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());166 }167 else168 {169 glDisable(GL_TEXTURE_2D);170 glBindTexture(GL_TEXTURE_2D, 0);171 }*/172 160 } 173 161 -
trunk/src/lib/graphics/importer/material.h
r7788 r7919 16 16 17 17 #include <vector> 18 #include "SDL_image.h"19 20 18 #include "texture.h" 21 19 … … 51 49 void setTransparency (char* trans); 52 50 51 void getDiffuseColor(float& r, float& g, float& b) const { r = diffuse[0], g = diffuse[1], b = diffuse[2]; } 53 52 54 53 // MAPPING //
Note: See TracChangeset
for help on using the changeset viewer.