diff --git a/src/celengine/texmanager.cpp b/src/celengine/texmanager.cpp index a95c852e9..bf1b278bd 100644 --- a/src/celengine/texmanager.cpp +++ b/src/celengine/texmanager.cpp @@ -98,8 +98,6 @@ Texture* TextureInfo::load(const fs::path& name) if (flags & NoMipMaps) mipMode = Texture::NoMipMaps; - else if (flags & AutoMipMaps) - mipMode = Texture::AutoMipMaps; if (bumpHeight == 0.0f) { diff --git a/src/celengine/texture.cpp b/src/celengine/texture.cpp index ec0197228..85dc5ae62 100644 --- a/src/celengine/texture.cpp +++ b/src/celengine/texture.cpp @@ -411,13 +411,7 @@ ImageTexture::ImageTexture(Image& img, } #endif -#ifndef GL_ES - if (mipMapMode == AutoMipMaps) - glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); -#endif - bool genMipmaps = mipmap && !precomputedMipMaps; - #if !defined(GL_ES) if (genMipmaps && !FramebufferObject::isSupported()) glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); @@ -426,18 +420,9 @@ ImageTexture::ImageTexture(Image& img, if (mipmap) { if (precomputedMipMaps) - { LoadMipmapSet(img, GL_TEXTURE_2D); - } else if (mipMapMode == DefaultMipMaps) - { LoadMiplessTexture(img, GL_TEXTURE_2D); - } - else - { - assert(mipMapMode == AutoMipMaps); - LoadMiplessTexture(img, GL_TEXTURE_2D); - } } else { @@ -932,13 +917,6 @@ static Texture* CreateTextureFromImage(Image& img, Texture::AddressMode addressMode, Texture::MipMapMode mipMode) { - // If non power of two textures are supported switch mipmap generation to - // automatic. gluBuildMipMaps may rescale the texture to a power of two - // on some drivers even when the hardware supports non power of two textures, - // whereas auto mipmap generation will properly deal with the dimensions. - if (mipMode == Texture::DefaultMipMaps) - mipMode = Texture::AutoMipMaps; - Texture* tex = nullptr; const int maxDim = gl::maxTextureSize; diff --git a/src/celengine/texture.h b/src/celengine/texture.h index 463343ef2..0b246333b 100644 --- a/src/celengine/texture.h +++ b/src/celengine/texture.h @@ -94,7 +94,6 @@ class Texture { DefaultMipMaps = 0, NoMipMaps = 1, - AutoMipMaps = 2, }; // Format option flags