fix another merge error

opengles2-fixes
Kirill Vainer 7 years ago
parent eba997cfb6
commit 1ca23adc6e
  1. 18
      jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

@ -2203,14 +2203,16 @@ 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)) {
// Image already has mipmaps, set the max level based on the if (img.hasMipmaps()) {
// number of mipmaps we have. // Image already has mipmaps, set the max level based on the
gl.glTexParameteri(target, GL2.GL_TEXTURE_MAX_LEVEL, img.getMipMapSizes().length - 1); // number of mipmaps we have.
} else { gl.glTexParameteri(target, GL2.GL_TEXTURE_MAX_LEVEL, img.getMipMapSizes().length - 1);
// Image does not have mipmaps and they are not required. } else {
// Specify that that the texture has no mipmaps. // Image does not have mipmaps and they are not required.
gl.glTexParameteri(target, GL2.GL_TEXTURE_MAX_LEVEL, 0); // Specify that that the texture has no mipmaps.
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

Loading…
Cancel
Save