From 583c8c525b0691a0cb2a195ced20969b2e0ff57f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 15 Oct 2015 14:04:21 +0200 Subject: Remove deprectated classes and methods --- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 26 ++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java') diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 2cb6228ba..31a8e489e 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1061,10 +1061,10 @@ public abstract class GLContextImpl extends GLContext { */ protected static MappedGLVersion mapAvailableGLVersion(final AbstractGraphicsDevice device, final int reqMajor, final int profile, - final VersionNumber resVersion, final int resCtp, final GLRendererQuirks resQuirks) + final VersionNumber resVersion, final int resCtp, + final GLRendererQuirks resQuirks) { - @SuppressWarnings("deprecation") - final Integer preVal = mapAvailableGLVersion(device, reqMajor, profile, resVersion.getMajor(), resVersion.getMinor(), resCtp); + final Integer preVal = mapAvailableGLVersion(device, reqMajor, profile, resVersion, resCtp); final int[] preCtp = { 0 }; final VersionNumber preVersion = null != preVal ? decomposeBits(preVal.intValue(), preCtp) : null; final MappedGLVersion res = new MappedGLVersion(device, reqMajor, profile, resVersion, resCtp, resQuirks, preVersion, preCtp[0]); @@ -1073,6 +1073,26 @@ public abstract class GLContextImpl extends GLContext { } return res; } + private static Integer mapAvailableGLVersion(final AbstractGraphicsDevice device, + final int reqMajor, final int profile, final VersionNumber resVersion, int resCtp) + { + validateProfileBits(profile, "profile"); + validateProfileBits(resCtp, "resCtp"); + + if(FORCE_NO_FBO_SUPPORT) { + resCtp &= ~CTX_IMPL_FBO ; + } + if(DEBUG) { + System.err.println(getThreadName() + ": createContextARB-MapGLVersions MAP "+device+": "+reqMajor+" ("+GLContext.getGLProfile(new StringBuilder(), profile).toString()+ ") -> "+ + getGLVersion(resVersion.getMajor(), resVersion.getMinor(), resCtp, null)); + } + final String objectKey = getDeviceVersionAvailableKey(device, reqMajor, profile); + final Integer val = Integer.valueOf(composeBits(resVersion.getMajor(), resVersion.getMinor(), resCtp)); + synchronized(deviceVersionAvailable) { + return deviceVersionAvailable.put( objectKey, val ); + } + } + protected static void remapAvailableGLVersions(final AbstractGraphicsDevice fromDevice, final AbstractGraphicsDevice toDevice) { if( fromDevice == toDevice || fromDevice.getUniqueID() == toDevice.getUniqueID() ) { -- cgit v1.2.3