aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-09 20:31:17 +0200
committerSven Gothel <[email protected]>2023-06-16 02:43:11 +0200
commit4267837c591c9c205ff5206afaf38bba8c4215ac (patch)
tree73db7e31ced10f3b793fadc9a76bb3d682e0fda4 /make/config/jogl
parent6fa48e0595d6b607195eee53c0b985a8cddfa7bb (diff)
Adopt to GlueGen commit 952e0c1f83c9e0583a97d39988a6ba1428911c8c
To limit growing code due to GlueGen's more capable new `Struct` emitter (more supported setter), `Struct` with intended read-only access have been marked `ImmutableAccess` in their GlueGen config file. Produced code with above setting compared with pre-GlueGen change is reduced while also having dropped all of the JNI calls retrieving `Struct` values. Only calls to function-pointer produced JNI methods, of course.
Diffstat (limited to 'make/config/jogl')
-rw-r--r--make/config/jogl/egl-common.cfg2
-rw-r--r--make/config/jogl/glu-base.cfg1
-rw-r--r--make/config/jogl/glu-gl2.cfg1
-rw-r--r--make/config/jogl/glu-gl2es1.cfg1
-rw-r--r--make/config/jogl/glx-CustomCCode.c16
-rw-r--r--make/config/jogl/glx-CustomJavaCode.java16
-rw-r--r--make/config/jogl/glx-x11.cfg2
-rw-r--r--make/config/jogl/wgl-win32.cfg3
8 files changed, 21 insertions, 21 deletions
diff --git a/make/config/jogl/egl-common.cfg b/make/config/jogl/egl-common.cfg
index 6728588c2..fc52de19d 100644
--- a/make/config/jogl/egl-common.cfg
+++ b/make/config/jogl/egl-common.cfg
@@ -25,6 +25,8 @@ Opaque long EGLSyncKHR
Opaque boolean EGLBoolean
Opaque long void *
+ImmutableAccess EGLClientPixmapHI
+
# Make eglGetProcAddress return an opaque long
Opaque long __EGLFuncPtr
diff --git a/make/config/jogl/glu-base.cfg b/make/config/jogl/glu-base.cfg
index 542f8afef..bfd399705 100644
--- a/make/config/jogl/glu-base.cfg
+++ b/make/config/jogl/glu-base.cfg
@@ -18,7 +18,6 @@ Ignore gluScaleImage
# Custom Java code for GLU class
IncludeAs CustomJavaCode GLU glu-CustomJavaCode-base.java
-ManualStaticInitCall GLU
# Imports for the Error and Registry classes
Import jogamp.opengl.glu.error.Error
diff --git a/make/config/jogl/glu-gl2.cfg b/make/config/jogl/glu-gl2.cfg
index c38f6a6b4..0182f587c 100644
--- a/make/config/jogl/glu-gl2.cfg
+++ b/make/config/jogl/glu-gl2.cfg
@@ -33,7 +33,6 @@ CustomCCode #include <GL/glu.h>
# Custom Java code for GLU class
IncludeAs CustomJavaCode GLUgl2 glu-CustomJavaCode-gl2.java
-ManualStaticInitCall GLUgl2
# GLU needs access to the GLUtesselatorImpl class for GLUtesselator,
# to the Mipmap class for scaling and mipmap generation,
diff --git a/make/config/jogl/glu-gl2es1.cfg b/make/config/jogl/glu-gl2es1.cfg
index 98217da1f..d983fe0ed 100644
--- a/make/config/jogl/glu-gl2es1.cfg
+++ b/make/config/jogl/glu-gl2es1.cfg
@@ -18,7 +18,6 @@ Ignore gluScaleImage
# Custom Java code for GLU class
IncludeAs CustomJavaCode GLUgl2es1 glu-CustomJavaCode-gl2es1.java
-ManualStaticInitCall GLUgl2es1
Import com.jogamp.opengl.GLES1
Import jogamp.opengl.glu.mipmap.Mipmap
diff --git a/make/config/jogl/glx-CustomCCode.c b/make/config/jogl/glx-CustomCCode.c
index b4b4f5b0a..bc3ffa5da 100644
--- a/make/config/jogl/glx-CustomCCode.c
+++ b/make/config/jogl/glx-CustomCCode.c
@@ -45,7 +45,7 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetFBConfigAttributes(JNIEnv *env, j
* C function: XVisualInfo * glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config);
*/
JNIEXPORT jobject JNICALL
-Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetVisualFromFBConfig(JNIEnv *env, jclass _unused, jlong dpy, jlong config, jlong procAddress) {
+Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetVisualFromFBConfig(JNIEnv *env, jclass _unused, jclass clazzBuffers, jlong dpy, jlong config, jlong procAddress) {
typedef XVisualInfo* (APIENTRY*_local_PFNGLXGETVISUALFROMFBCONFIG)(Display * dpy, GLXFBConfig config);
_local_PFNGLXGETVISUALFROMFBCONFIG ptr_glXGetVisualFromFBConfig;
XVisualInfo * _res;
@@ -55,7 +55,7 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetVisualFromFBConfig(JNIEnv *env, j
_res = (* ptr_glXGetVisualFromFBConfig) ((Display *) (intptr_t) dpy, (GLXFBConfig) (intptr_t) config);
if (_res == NULL) return NULL;
- jbyteCopy = JVMUtil_NewDirectByteBufferCopy(env, _res, sizeof(XVisualInfo));
+ jbyteCopy = JVMUtil_NewDirectByteBufferCopy(env, clazzBuffers, _res, sizeof(XVisualInfo));
XFree(_res);
return jbyteCopy;
@@ -67,7 +67,7 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetVisualFromFBConfig(JNIEnv *env, j
* C function: GLXFBConfig * glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems);
*/
JNIEXPORT jobject JNICALL
-Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseFBConfig(JNIEnv *env, jclass _unused, jlong dpy, jint screen, jobject attribList, jint attribList_byte_offset, jobject nitems, jint nitems_byte_offset, jlong procAddress) {
+Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseFBConfig(JNIEnv *env, jclass _unused, jclass clazzBuffers, jlong dpy, jint screen, jobject attribList, jint attribList_byte_offset, jobject nitems, jint nitems_byte_offset, jlong procAddress) {
typedef GLXFBConfig * (APIENTRY*_local_PFNGLXCHOOSEFBCONFIGPROC)(Display * dpy, int screen, const int * attribList, int * nitems);
_local_PFNGLXCHOOSEFBCONFIGPROC ptr_glXChooseFBConfig;
int * _attribList_ptr = NULL;
@@ -105,7 +105,7 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseFBConfig(JNIEnv *env, jclass _
}
// fprintf(stderr, "glXChooseFBConfig.X: Count %d\n", count);
- jbyteCopy = JVMUtil_NewDirectByteBufferCopy(env, _res, count * sizeof(GLXFBConfig));
+ jbyteCopy = JVMUtil_NewDirectByteBufferCopy(env, clazzBuffers, _res, count * sizeof(GLXFBConfig));
XFree(_res);
return jbyteCopy;
@@ -117,7 +117,7 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseFBConfig(JNIEnv *env, jclass _
* C function: GLXFBConfig * glXGetFBConfigs(Display * dpy, int screen, int * nelements);
*/
JNIEXPORT jobject JNICALL
-Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetFBConfigs(JNIEnv *env, jclass _unused, jlong dpy, jint screen, jobject nelements, jint nelements_byte_offset, jlong procAddress) {
+Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetFBConfigs(JNIEnv *env, jclass _unused, jclass clazzBuffers, jlong dpy, jint screen, jobject nelements, jint nelements_byte_offset, jlong procAddress) {
typedef GLXFBConfig * (APIENTRY*_local_PFNGLXGETFBCONFIGSPROC)(Display * dpy, int screen, int * nelements);
_local_PFNGLXGETFBCONFIGSPROC ptr_glXGetFBConfigs;
int * _nelements_ptr = NULL;
@@ -149,7 +149,7 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetFBConfigs(JNIEnv *env, jclass _un
}
}
- jbyteCopy = JVMUtil_NewDirectByteBufferCopy(env, _res, count * sizeof(GLXFBConfig));
+ jbyteCopy = JVMUtil_NewDirectByteBufferCopy(env, clazzBuffers, _res, count * sizeof(GLXFBConfig));
XFree(_res);
return jbyteCopy;
@@ -162,7 +162,7 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetFBConfigs(JNIEnv *env, jclass _un
* C function: XVisualInfo * glXChooseVisual(Display * dpy, int screen, int * attribList);
*/
JNIEXPORT jobject JNICALL
-Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseVisual(JNIEnv *env, jclass _unused, jlong dpy, jint screen, jobject attribList, jint attribList_byte_offset, jlong procAddress) {
+Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseVisual(JNIEnv *env, jclass _unused, jclass clazzBuffers, jlong dpy, jint screen, jobject attribList, jint attribList_byte_offset, jlong procAddress) {
typedef XVisualInfo * (APIENTRY*_local_PFNGLXCHOOSEVISUALPROC)(Display * dpy, int screen, int * attribList);
_local_PFNGLXCHOOSEVISUALPROC ptr_glXChooseVisual;
int * _attribList_ptr = NULL;
@@ -176,7 +176,7 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseVisual(JNIEnv *env, jclass _un
_res = (* ptr_glXChooseVisual) ((Display *) (intptr_t) dpy, (int) screen, (int *) _attribList_ptr);
if (NULL == _res) return NULL;
- jbyteCopy = JVMUtil_NewDirectByteBufferCopy(env, _res, sizeof(XVisualInfo));
+ jbyteCopy = JVMUtil_NewDirectByteBufferCopy(env, clazzBuffers, _res, sizeof(XVisualInfo));
XFree(_res);
return jbyteCopy;
diff --git a/make/config/jogl/glx-CustomJavaCode.java b/make/config/jogl/glx-CustomJavaCode.java
index 5a3ea392b..2a70b4442 100644
--- a/make/config/jogl/glx-CustomJavaCode.java
+++ b/make/config/jogl/glx-CustomJavaCode.java
@@ -28,13 +28,13 @@
if (__addr_ == 0) {
throw new GLException("Method \"glXGetVisualFromFBConfig\" not available");
}
- final java.nio.ByteBuffer _res = dispatch_glXGetVisualFromFBConfig(dpy, config, __addr_);
+ final java.nio.ByteBuffer _res = dispatch_glXGetVisualFromFBConfig(com.jogamp.common.nio.Buffers.class, dpy, config, __addr_);
if (_res == null) return null;
return XVisualInfo.create(Buffers.nativeOrder(_res));
}
/** Entry point to C language function: - Alias for: <br> <code> XVisualInfo * glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config); </code> */
- private static native java.nio.ByteBuffer dispatch_glXGetVisualFromFBConfig(long dpy, long config, long procAddr);
+ private static native java.nio.ByteBuffer dispatch_glXGetVisualFromFBConfig(Class clazzBuffers, long dpy, long config, long procAddr);
/** Entry point to C language function: <code> GLXFBConfig * glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems); </code> <br>Part of CORE FUNC
@@ -50,7 +50,7 @@
if (__addr_ == 0) {
throw new GLException("Method \"glXChooseFBConfig\" not available");
}
- final ByteBuffer _res = dispatch_glXChooseFBConfig(dpy, screen, attribList, Buffers.getDirectBufferByteOffset(attribList), nitems, Buffers.getDirectBufferByteOffset(nitems), __addr_);
+ final ByteBuffer _res = dispatch_glXChooseFBConfig(com.jogamp.common.nio.Buffers.class, dpy, screen, attribList, Buffers.getDirectBufferByteOffset(attribList), nitems, Buffers.getDirectBufferByteOffset(nitems), __addr_);
if (_res == null) return null;
return PointerBuffer.wrap(Buffers.nativeOrder(_res));
}
@@ -58,7 +58,7 @@
/** Entry point to C language function: <code> GLXFBConfig * glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems); </code> <br>Part of CORE FUNC
@param attribList a direct only {@link java.nio.IntBuffer}
@param nitems a direct only {@link java.nio.IntBuffer} */
- private static native ByteBuffer dispatch_glXChooseFBConfig(long dpy, int screen, Object attribList, int attribList_byte_offset, Object nitems, int nitems_byte_offset, long procAddress);
+ private static native ByteBuffer dispatch_glXChooseFBConfig(Class clazzBuffers, long dpy, int screen, Object attribList, int attribList_byte_offset, Object nitems, int nitems_byte_offset, long procAddress);
/** Entry point to C language function: <code> GLXFBConfig * glXGetFBConfigs(Display * dpy, int screen, int * nelements); </code> <br>Part of <code>GLX_VERSION_1_3</code>
@param nelements a direct only {@link java.nio.IntBuffer} */
@@ -70,14 +70,14 @@
if (__addr_ == 0) {
throw new GLException(String.format("Method \"%s\" not available", "glXGetFBConfigs"));
}
- final ByteBuffer _res = dispatch_glXGetFBConfigs(dpy, screen, nelements, Buffers.getDirectBufferByteOffset(nelements), __addr_);
+ final ByteBuffer _res = dispatch_glXGetFBConfigs(com.jogamp.common.nio.Buffers.class, dpy, screen, nelements, Buffers.getDirectBufferByteOffset(nelements), __addr_);
if (_res == null) return null;
return PointerBuffer.wrap(Buffers.nativeOrder(_res));
}
/** Entry point to C language function: <code> GLXFBConfig * glXGetFBConfigs(Display * dpy, int screen, int * nelements); </code> <br>Part of <code>GLX_VERSION_1_3</code>
@param nelements a direct only {@link java.nio.IntBuffer} */
- private static native ByteBuffer dispatch_glXGetFBConfigs(long dpy, int screen, Object nelements, int nelements_byte_offset, long procAddress);
+ private static native ByteBuffer dispatch_glXGetFBConfigs(Class clazzBuffers, long dpy, int screen, Object nelements, int nelements_byte_offset, long procAddress);
/** Entry point to C language function: <code> XVisualInfo * glXChooseVisual(Display * dpy, int screen, int * attribList); </code> <br>Part of <code>GLX_VERSION_1_X</code>
@@ -90,12 +90,12 @@
if (__addr_ == 0) {
throw new GLException("Method \"glXChooseVisual\" not available");
}
- final ByteBuffer _res = dispatch_glXChooseVisual(dpy, screen, attribList, Buffers.getDirectBufferByteOffset(attribList), __addr_);
+ final ByteBuffer _res = dispatch_glXChooseVisual(com.jogamp.common.nio.Buffers.class, dpy, screen, attribList, Buffers.getDirectBufferByteOffset(attribList), __addr_);
if (_res == null) return null;
return XVisualInfo.create(Buffers.nativeOrder(_res));
}
/** Entry point to C language function: <code> XVisualInfo * glXChooseVisual(Display * dpy, int screen, int * attribList); </code> <br>Part of <code>GLX_VERSION_1_X</code>
@param attribList a direct only {@link java.nio.IntBuffer} */
- private static native ByteBuffer dispatch_glXChooseVisual(long dpy, int screen, Object attribList, int attribList_byte_offset, long procAddress);
+ private static native ByteBuffer dispatch_glXChooseVisual(Class clazzBuffers, long dpy, int screen, Object attribList, int attribList_byte_offset, long procAddress);
diff --git a/make/config/jogl/glx-x11.cfg b/make/config/jogl/glx-x11.cfg
index 17b5fa8d7..d17a22aa3 100644
--- a/make/config/jogl/glx-x11.cfg
+++ b/make/config/jogl/glx-x11.cfg
@@ -38,8 +38,6 @@ IncludeAs CustomJavaCode GLX glx-CustomJavaCode.java
Include glx-headers.cfg
IncludeAs CustomCCode glx-CustomCCode.c
-ForceStaticInitCode GLX
-
ArgumentIsString XOpenDisplay 0
Opaque long GLXFBConfig
diff --git a/make/config/jogl/wgl-win32.cfg b/make/config/jogl/wgl-win32.cfg
index b3db05cec..f480ae4ce 100644
--- a/make/config/jogl/wgl-win32.cfg
+++ b/make/config/jogl/wgl-win32.cfg
@@ -23,6 +23,9 @@ LocalProcAddressCallingConvention __ALL__ APIENTRY
NIOOnly __ALL__
NIODirectOnly __ALL__
+ImmutableAccess RECT
+ImmutableAccess PGPU_DEVICE
+
AllowNonGLExtensions true
EmitProcAddressTable true
ProcAddressTableClassName WGLProcAddressTable