From 0b316f93e9c633c44e9f7783d4748aa0d263f4fd Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 14 Feb 2012 01:25:32 +0100 Subject: Fix ExtensionAvailabilityCache ; Enhance caching. ExtensionAvailabilityCache regression / enhancement: - Set context version (w/o string) before caching. This is required since we query the ctx version. Regression from 4011e70eed8c88aee0fcd051a50ab3f15bb94f68 - Remove GLContextImpl state. Only use the passed value at initialization. - Defined initialization, due to the 'new' cache/instantiation logic Remove redundant GLContext profile bits: - CTX_OPTION_ANY: implicit if !CTX_OPTION_FORWARD - CTX_IMPL_ACCEL_HARD: implicit if !CTX_IMPL_ACCEL_SOFT Cache key (ProcAddressTable, Extensions): - Mask out GLContext.CTX_OPTION_DEBUG | GLContext.CTX_IMPL_ES2_COMPAT, since they don't influence the cached values. --- .../classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java | 2 +- src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl') diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java index b183ad59f..b09a038d8 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java @@ -65,7 +65,7 @@ public class WindowsExternalWGLContext extends WindowsWGLContext { System.err.println(getThreadName() + ": !!! Created external OpenGL context " + toHexString(ctx) + " for " + this); } GLContextShareSet.contextCreated(this); - setGLFunctionAvailability(false, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY); // use GL_VERSION + setGLFunctionAvailability(false, 0, 0, CTX_PROFILE_COMPAT); // use GL_VERSION getGLStateTracker().setEnabled(false); // external context usage can't track state in Java } diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java index 66c203a44..6fc5ab8d0 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java @@ -296,7 +296,7 @@ public class WindowsWGLContext extends GLContextImpl { if (!WGL.wglMakeCurrent(drawable.getHandle(), temp_ctx)) { throw new GLException("Error making temp context current: 0x" + toHexString(temp_ctx) + ", werr: "+GDI.GetLastError()); } - setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY); // use GL_VERSION + setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT); // use GL_VERSION boolean isCreateContextAttribsARBAvailable = isFunctionAvailable("wglCreateContextAttribsARB"); WGL.wglMakeCurrent(0, 0); // release temp context -- cgit v1.2.3