aboutsummaryrefslogtreecommitdiffstats
path: root/make/glx-CustomCCode.c
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-02-10 20:06:04 +0000
committerKenneth Russel <[email protected]>2006-02-10 20:06:04 +0000
commit4b14f14cbb84c3d60d3fb501d78873c574eec6bd (patch)
tree2bac953157778f18e0eff06c4c01fe08e55d9076 /make/glx-CustomCCode.c
parentc6ed1767abe191648219a403828ecf32ad5ad25e (diff)
Made loading of GLU library lazier, partially in the hope that this
may address problems on certain Linux distributions where for some reason we're falling back to software rendering with Mesa git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@595 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/glx-CustomCCode.c')
-rwxr-xr-xmake/glx-CustomCCode.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/make/glx-CustomCCode.c b/make/glx-CustomCCode.c
index 504b8432f..791927604 100755
--- a/make/glx-CustomCCode.c
+++ b/make/glx-CustomCCode.c
@@ -51,6 +51,17 @@ JNIEXPORT jlong JNICALL
Java_com_sun_opengl_impl_x11_GLX_RootWindow(JNIEnv *env, jclass _unused, jlong display, jint screen) {
return RootWindow((Display*) (intptr_t) display, screen);
}
+
+JNIEXPORT jlong JNICALL
+Java_com_sun_opengl_impl_x11_GLX_dlopen(JNIEnv *env, jclass _unused, jstring name) {
+ const jbyte* chars;
+ void* res;
+ chars = (*env)->GetStringUTFChars(env, name, NULL);
+ res = dlopen(chars, RTLD_LAZY | RTLD_GLOBAL);
+ (*env)->ReleaseStringUTFChars(env, name, chars);
+ return (jlong) ((intptr_t) res);
+}
+
JNIEXPORT jlong JNICALL
Java_com_sun_opengl_impl_x11_GLX_dlsym(JNIEnv *env, jclass _unused, jstring name) {
const jbyte* chars;