From 733cdc016ebd9764330f347febd39452e2be0535 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 7 Aug 2011 07:54:18 +0200 Subject: no GL_VERSION_X extensions for ES profiles --- .../jogamp/opengl/ExtensionAvailabilityCache.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/jogl/classes/jogamp/opengl/ExtensionAvailabilityCache.java b/src/jogl/classes/jogamp/opengl/ExtensionAvailabilityCache.java index b5223a5b6..971b32d47 100644 --- a/src/jogl/classes/jogamp/opengl/ExtensionAvailabilityCache.java +++ b/src/jogl/classes/jogamp/opengl/ExtensionAvailabilityCache.java @@ -173,14 +173,16 @@ final class ExtensionAvailabilityCache { System.err.println(getThreadName() + ":ExtensionAvailabilityCache: ALL EXTENSIONS: "+availableExtensionCache.size()); } - int major[] = new int[] { context.getGLVersionMajor() }; - int minor[] = new int[] { context.getGLVersionMinor() }; - while (GLContext.isValidGLVersion(major[0], minor[0])) { - availableExtensionCache.add("GL_VERSION_" + major[0] + "_" + minor[0]); - if (DEBUG) { - System.err.println(getThreadName() + ":ExtensionAvailabilityCache: Added GL_VERSION_" + major[0] + "_" + minor[0] + " to known extensions"); - } - if(!GLContext.decrementGLVersion(major, minor)) break; + if(!context.isGLES()) { + int major[] = new int[] { context.getGLVersionMajor() }; + int minor[] = new int[] { context.getGLVersionMinor() }; + while (GLContext.isValidGLVersion(major[0], minor[0])) { + availableExtensionCache.add("GL_VERSION_" + major[0] + "_" + minor[0]); + if (DEBUG) { + System.err.println(getThreadName() + ":ExtensionAvailabilityCache: Added GL_VERSION_" + major[0] + "_" + minor[0] + " to known extensions"); + } + if(!GLContext.decrementGLVersion(major, minor)) break; + } } // put a dummy var in here so that the cache is no longer empty even if -- cgit v1.2.3