Changeset 6165 in orxonox.OLD for branches/christmas_branche/src
- Timestamp:
- Dec 19, 2005, 7:29:26 PM (19 years ago)
- Location:
- branches/christmas_branche
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/lib/graphics/importer/texture.cc
r6145 r6165 262 262 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); 263 263 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 264 265 264 266 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); 265 267 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); 266 268 267 269 /* control the mipmap levels */ 268 glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MIN_LOD, -100); 269 glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MAX_LOD, 0);270 // glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MIN_LOD, 5);f 271 // glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MAX_LOD, 0); 270 272 glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_PRIORITY, this->priority); 271 273 … … 290 292 ); 291 293 if(unlikely(errorCode != 0)) 292 PRINTF(1)("Error while loading texture, gluBuild2DMipmaps returned %i\n", errorCode); 293 294 // #define max(a,b) (a>b)?a:b 295 // mipmapLevel = (int)(log2f(max(surface->w, surface->h))); 296 // #undef max 297 // PRINTF(5)("Built the texture mipmpaps, got: %i levels of detail\n", mipmapLevel); 298 299 /* now actualy load the mipmaps into the graphics memory */ 300 // glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 1, GL_TEXTURE_WIDTH, &mipmapWidth); 301 // glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 1, GL_TEXTURE_WIDTH, &mipmapHight); 302 // PRINTF(5)(" Mipmap at level %i has a %ix%i resolution\n", 1, mipmapWidth, mipmapHight); 303 // glTexImage2D(GL_PROXY_TEXTURE_2D, 304 // 1, 305 // GL_RGBA, 306 // mipmapWidth, mipmapHight, 307 // 0, 308 // GL_RGBA, 309 // GL_UNSIGNED_BYTE, 310 // NULL 311 // ); 294 PRINTF(1)("Error while loading texture (mipmap generation), gluBuild2DMipmaps returned %i\n", errorCode); 312 295 313 296 glBindTexture(GL_TEXTURE_2D, 0);
Note: See TracChangeset
for help on using the changeset viewer.