diff options
author | Sven Gothel <sgothel@jausoft.com> | 2010-04-16 03:51:00 +0200 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2010-04-16 03:51:00 +0200 |
commit | bb028021be2714e66d9b1062298a3e308c649c56 (patch) | |
tree | d20a568ae0d7da2b9f600464a5bc18d88edb1b89 /src/jogl/classes/com/jogamp/opengl/impl/windows/wgl | |
parent | bd4904fb04ab2168aeaf76e74385b3991429289a (diff) |
JOGL GL4 preperation:
- Re-Enable GL3bc native library build, works ..
- Adding all the is/get GL4/GL4bc stubs ..
- Adding dummy interface GL4 and GL4bc, will be removed when done
- Context creation refactoring:
- Move Version information to GLContext
- Determine version by creation if possible (ARB_create_context),
only use the unreliable GL_VERSION string if necessary.
- Offering an almost platform independent ARB_create_context path:
- createContextARBImpl - platform dependent GLX calls
- createContextARB - platform independent setup and version loop
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/windows/wgl')
-rwxr-xr-x | src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java | 2 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java index da8b70eb8..aae376a6c 100755 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java @@ -56,7 +56,7 @@ public class WindowsExternalWGLContext extends WindowsWGLContext { System.err.println(getThreadName() + ": !!! Created external OpenGL context " + toHexString(hglrc) + " for " + this); } GLContextShareSet.contextCreated(this); - setGLFunctionAvailability(false); + setGLFunctionAvailability(false, 0, 0, 0); cfg.updateCapabilitiesByWGL(this); getGLStateTracker().setEnabled(false); // external context usage can't track state in Java } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java index b3f4c498c..5b6d65f62 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java @@ -122,6 +122,10 @@ public class WindowsWGLContext extends GLContextImpl { protected Map/*<String, String>*/ getExtensionNameMap() { return extensionNameMap; } + protected long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor) { + return 0; // FIXME + } + /** * Creates and initializes an appropriate OpenGL context. Should only be * called by {@link #makeCurrentImpl()}. @@ -157,7 +161,7 @@ public class WindowsWGLContext extends GLContextImpl { if (!WGL.wglMakeCurrent(drawable.getNativeWindow().getSurfaceHandle(), temp_hglrc)) { throw new GLException("Error making temp context current: 0x" + Integer.toHexString(WGL.GetLastError())); } - setGLFunctionAvailability(true); + setGLFunctionAvailability(true, 0, 0, 0); if( !isFunctionAvailable("wglCreateContextAttribsARB") || !isExtensionAvailable("WGL_ARB_create_context") ) { @@ -243,7 +247,7 @@ public class WindowsWGLContext extends GLContextImpl { if (!WGL.wglMakeCurrent(drawable.getNativeWindow().getSurfaceHandle(), hglrc)) { throw new GLException("Error making old context current: 0x" + Integer.toHexString(WGL.GetLastError())); } - updateGLProcAddressTable(); + updateGLProcAddressTable(0, 0, 0); if(DEBUG) { System.err.println("WindowsWGLContext.create done (old ctx < 3.0 - no 3.0) 0x"+Long.toHexString(hglrc)); } @@ -255,7 +259,7 @@ public class WindowsWGLContext extends GLContextImpl { if (!WGL.wglMakeCurrent(drawable.getNativeWindow().getSurfaceHandle(), hglrc)) { throw new GLException("Error making new context current: 0x" + Integer.toHexString(WGL.GetLastError())); } - updateGLProcAddressTable(); + updateGLProcAddressTable(0, 0, 0); if(DEBUG) { System.err.println("WindowsWGLContext.create done (new ctx >= 3.0) 0x"+Long.toHexString(hglrc)); } @@ -304,7 +308,7 @@ public class WindowsWGLContext extends GLContextImpl { } if (created) { - setGLFunctionAvailability(false); + setGLFunctionAvailability(false, -1, -1, -1); WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration(); @@ -353,7 +357,7 @@ public class WindowsWGLContext extends GLContextImpl { } } - protected void updateGLProcAddressTable() { + protected void updateGLProcAddressTable(int major, int minor, int ctp) { if (DEBUG) { System.err.println(getThreadName() + ": !!! Initializing WGL extension address table for " + this); } @@ -369,7 +373,7 @@ public class WindowsWGLContext extends GLContextImpl { wglExtProcAddressTable = new WGLExtProcAddressTable(); } resetProcAddressTable(getWGLExtProcAddressTable()); - super.updateGLProcAddressTable(); + super.updateGLProcAddressTable(major, minor, ctp); } public String getPlatformExtensionsString() { |