|
@@ -2197,11 +2197,15 @@ public final class GLRenderer implements Renderer {
|
|
|
} else if (img.hasMipmaps()) {
|
|
|
// Image already has mipmaps, set the max level based on the
|
|
|
// number of mipmaps we have.
|
|
|
- gl.glTexParameteri(target, GL.GL_TEXTURE_MAX_LEVEL, img.getMipMapSizes().length - 1);
|
|
|
+ if (caps.contains(Caps.OpenGL20)) {
|
|
|
+ gl.glTexParameteri(target, GL2.GL_TEXTURE_MAX_LEVEL, img.getMipMapSizes().length - 1);
|
|
|
+ }
|
|
|
} else {
|
|
|
// Image does not have mipmaps and they are not required.
|
|
|
// Specify that that the texture has no mipmaps.
|
|
|
- gl.glTexParameteri(target, GL.GL_TEXTURE_MAX_LEVEL, 0);
|
|
|
+ if (caps.contains(Caps.OpenGL20)) {
|
|
|
+ gl.glTexParameteri(target, GL2.GL_TEXTURE_MAX_LEVEL, 0);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
int imageSamples = img.getMultiSamples();
|