From c3a2564750fe05ac751b83120c94163cac853956 Mon Sep 17 00:00:00 2001 From: gohai Date: Tue, 19 Apr 2016 23:18:12 +0200 Subject: [PATCH] Add automatic mipmap support to GLES2 glGenerateMipmap is supported on GL ES 2.0 and above. Compile-tested. --- core/src/processing/opengl/PGL.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index 8b471751c..bfc9cc6ef 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -2110,11 +2110,13 @@ public abstract class PGL { protected boolean hasAutoMipmapGenSupport() { int major = getGLVersion()[0]; - if (major < 3) { + if (isES() && major >= 2) { + return true; + } else if (!isES() && major >= 3) { + return true; + } else { String ext = getString(EXTENSIONS); return -1 < ext.indexOf("_generate_mipmap"); - } else { - return true; } }