diff options
author | Sven Gothel <[email protected]> | 2023-06-09 20:31:17 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-06-16 02:43:11 +0200 |
commit | 4267837c591c9c205ff5206afaf38bba8c4215ac (patch) | |
tree | 73db7e31ced10f3b793fadc9a76bb3d682e0fda4 /make/config/jogl/glx-CustomCCode.c | |
parent | 6fa48e0595d6b607195eee53c0b985a8cddfa7bb (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/glx-CustomCCode.c')
-rw-r--r-- | make/config/jogl/glx-CustomCCode.c | 16 |
1 files changed, 8 insertions, 8 deletions
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; |