fix another merge error

This commit is contained in:
Kirill Vainer 2017-09-17 22:48:05 -04:00
parent eba997cfb6
commit 1ca23adc6e

View File

@ -2203,7 +2203,8 @@ public final class GLRenderer implements Renderer {
// For OpenGL3 and up. // For OpenGL3 and up.
// We'll generate mipmaps via glGenerateMipmapEXT (see below) // We'll generate mipmaps via glGenerateMipmapEXT (see below)
} }
} else if (img.hasMipmaps()) { } else if (caps.contains(Caps.OpenGL20)) {
if (img.hasMipmaps()) {
// Image already has mipmaps, set the max level based on the // Image already has mipmaps, set the max level based on the
// number of mipmaps we have. // number of mipmaps we have.
gl.glTexParameteri(target, GL2.GL_TEXTURE_MAX_LEVEL, img.getMipMapSizes().length - 1); gl.glTexParameteri(target, GL2.GL_TEXTURE_MAX_LEVEL, img.getMipMapSizes().length - 1);
@ -2212,6 +2213,7 @@ public final class GLRenderer implements Renderer {
// Specify that that the texture has no mipmaps. // Specify that that the texture has no mipmaps.
gl.glTexParameteri(target, GL2.GL_TEXTURE_MAX_LEVEL, 0); gl.glTexParameteri(target, GL2.GL_TEXTURE_MAX_LEVEL, 0);
} }
}
} else { } else {
// Check if graphics card doesn't support multisample textures // Check if graphics card doesn't support multisample textures
if (!caps.contains(Caps.TextureMultisample)) { if (!caps.contains(Caps.TextureMultisample)) {