summaryrefslogtreecommitdiffstats
path: root/make/config/jogl/wgl-win32.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'make/config/jogl/wgl-win32.cfg')
-rw-r--r--make/config/jogl/wgl-win32.cfg29
1 files changed, 22 insertions, 7 deletions
diff --git a/make/config/jogl/wgl-win32.cfg b/make/config/jogl/wgl-win32.cfg
index 2a69290a4..97938a853 100644
--- a/make/config/jogl/wgl-win32.cfg
+++ b/make/config/jogl/wgl-win32.cfg
@@ -5,21 +5,30 @@ NativeOutputDir gensrc/native/jogl/Windows
Package com.jogamp.opengl.impl.windows.wgl
JavaClass WGL
-Style allstatic
+Style AllStatic
Include gl-common.cfg
Include gl-common-extensions.cfg
Include gl-desktop.cfg
-AllowNonGLExtensions true
-
GLHeader wingdi.h
GLHeader GL/wglext.h
+ForceProcAddressGen __ALL__
+LocalProcAddressCallingConvention __ALL__ APIENTRY
+
+AllowNonGLExtensions true
+EmitProcAddressTable true
+ProcAddressTableClassName WGLProcAddressTable
+GetProcAddressTableExpr wglProcAddressTable
+
+Import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver
+
+CustomJavaCode WGL private static WGLProcAddressTable wglProcAddressTable = new WGLProcAddressTable(new GLProcAddressResolver());
+CustomJavaCode WGL public static WGLProcAddressTable getWGLProcAddressTable() { return wglProcAddressTable; }
+
# Implement the first argument to wglGetProcAddress as String instead
# of byte[]
ArgumentIsString wglGetProcAddress 0
-ArgumentIsString LoadLibraryA 0
-ArgumentIsString GetProcAddress 1
CustomCCode #define WIN32_LEAN_AND_MEAN
CustomCCode #include <windows.h>
@@ -30,8 +39,6 @@ CustomCCode #include <stddef.h>
Include ../intptr.cfg
-IncludeAs CustomCCode wgl-CustomCCode.c
-
DropUniqVendorExtensions AMD
# We need GL_APPLE_float_pixels for our pbuffer implementation
# DropUniqVendorExtensions APPLE
@@ -47,3 +54,11 @@ DropUniqVendorExtensions SGIX
DropUniqVendorExtensions SUN
DropUniqVendorExtensions WIN
+CustomJavaCode WGL protected static long wglGetProcAddress(long wglGetProcAddressHandle, java.lang.String procname)
+CustomJavaCode WGL {
+CustomJavaCode WGL if (wglGetProcAddressHandle == 0) {
+CustomJavaCode WGL throw new GLException("Passed null pointer for method \"wglGetProcAddress\"");
+CustomJavaCode WGL }
+CustomJavaCode WGL return dispatch_wglGetProcAddress1(procname, wglGetProcAddressHandle);
+CustomJavaCode WGL }
+