Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6165 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Dec 19, 2005, 7:29:26 PM (19 years ago)
Author:
patrick
Message:

branches: added a branche christmas for some christmas tests

File:
1 edited

Legend:

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

    r6145 r6165  
    262262  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
    263263  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
     264
     265
    264266  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
    265267  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
    266268
    267269  /* 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);
    270272  glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_PRIORITY, this->priority);
    271273
     
    290292                               );
    291293  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);
    312295
    313296  glBindTexture(GL_TEXTURE_2D, 0);
Note: See TracChangeset for help on using the changeset viewer.