Remove automatic mipmap mode, as it duplicates the default mode

pull/1191/head
Hleb Valoshka 2021-11-27 23:01:15 +02:00
parent 7228d408e0
commit f46a00f4f1
3 changed files with 0 additions and 25 deletions

View File

@ -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)
{

View File

@ -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;

View File

@ -94,7 +94,6 @@ class Texture
{
DefaultMipMaps = 0,
NoMipMaps = 1,
AutoMipMaps = 2,
};
// Format option flags