Commit 55e01dd9 authored by hybrid's avatar hybrid

Add hint for auto mipmap generation in OpenGL.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2078 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 662e2dc2
...@@ -184,14 +184,22 @@ void COpenGLTexture::copyTexture(bool newTexture) ...@@ -184,14 +184,22 @@ void COpenGLTexture::copyTexture(bool newTexture)
if (newTexture) if (newTexture)
{ {
#ifndef DISABLE_MIPMAPPING #ifndef DISABLE_MIPMAPPING
#ifdef GL_SGIS_generate_mipmap
if (HasMipMaps && Driver->queryFeature(EVDF_MIP_MAP_AUTO_UPDATE)) if (HasMipMaps && Driver->queryFeature(EVDF_MIP_MAP_AUTO_UPDATE))
{ {
if (Driver->getTextureCreationFlag(ETCF_OPTIMIZED_FOR_SPEED))
glHint(GENERATE_MIPMAP_HINT_SGIS, GL_FASTEST);
else if (Driver->getTextureCreationFlag(ETCF_OPTIMIZED_FOR_QUALITY))
glHint(GENERATE_MIPMAP_HINT_SGIS, GL_NICEST);
else
glHint(GENERATE_MIPMAP_HINT_SGIS, GL_DONT_CARE);
// automatically generate and update mipmaps // automatically generate and update mipmaps
glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE ); glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE );
AutomaticMipmapUpdate=true; AutomaticMipmapUpdate=true;
} }
else else
#endif
{ {
AutomaticMipmapUpdate=false; AutomaticMipmapUpdate=false;
regenerateMipMapLevels(); regenerateMipMapLevels();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment