aboutsummaryrefslogtreecommitdiffstats
path: root/src/native
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-11-09 23:40:33 +0000
committerKenneth Russel <[email protected]>2005-11-09 23:40:33 +0000
commitc3f4b1c7ccdd682f772fb0bdb67e3dd292ba9c06 (patch)
tree21f58338f25e986abe3c984ce1b6025552501367 /src/native
parent221199afb57829adac29f3b2988453b67331a324 (diff)
Made public API changes discussed with expert group to make core JOGL
API more toolkit-agnostic: 1. Decoupled instantiation of GLCanvas and GLJPanel objects from the GLDrawableFactory. GLCanvas and GLJPanel's constructors are now public and the associated factory methods have been removed from the GLDrawableFactory. 2. Changed the signature of GLDrawableFactory. chooseGraphicsConfiguration() to accept and return marker AbstractGraphicsDevice and AbstractGraphicsConfiguration interfaces, respectively. Defined new AWTGraphicsDevice and AWTGraphicsConfiguration wrapper classes simply wrapping the associated objects. An SWT port could define similar wrapper classes for its data types. 3. Allowed overriding of the specific GLDrawableFactory subclass instantiated through GLDrawableFactory.getFactory() by setting the system property "opengl.factory.class.name". For example, an SWT port might swap itself in by specifying the following system property on the command line: -Dopengl.factory.class.name=com.ibm.swt.opengl.SWTGLDrawableFactory Tested on Solaris/SPARC. Also fixed breakage on Solaris/SPARC due to recent split of jogl native library into jogl and jogl_awt pieces. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@431 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/native')
-rw-r--r--src/native/jogl/InternalBufferUtils.c9
-rw-r--r--src/native/jogl/JAWT_DrawingSurfaceInfo.c9
2 files changed, 9 insertions, 9 deletions
diff --git a/src/native/jogl/InternalBufferUtils.c b/src/native/jogl/InternalBufferUtils.c
index 083f51b42..aced365b7 100644
--- a/src/native/jogl/InternalBufferUtils.c
+++ b/src/native/jogl/InternalBufferUtils.c
@@ -52,3 +52,12 @@ JNIEXPORT jobject JNICALL
Java_com_sun_opengl_impl_InternalBufferUtils_newDirectByteBuffer(JNIEnv* env, jclass unused, jlong address, jint capacity) {
return (*env)->NewDirectByteBuffer(env, (void*) (intptr_t) address, capacity);
}
+
+#ifdef __sun
+#include <dlfcn.h>
+/* Sun's GLX implementation doesn't have glXGetProcAddressARB (or
+ glXGetProcAddress) so we implement it here */
+void (*glXGetProcAddressARB(const char *procname))() {
+ return (void (*)()) dlsym(RTLD_DEFAULT, procname);
+}
+#endif /* __ sun */
diff --git a/src/native/jogl/JAWT_DrawingSurfaceInfo.c b/src/native/jogl/JAWT_DrawingSurfaceInfo.c
index 6eeaf053b..ae5c3f935 100644
--- a/src/native/jogl/JAWT_DrawingSurfaceInfo.c
+++ b/src/native/jogl/JAWT_DrawingSurfaceInfo.c
@@ -92,12 +92,3 @@ Java_com_sun_opengl_impl_JAWT_1DrawingSurfaceInfo_platformInfo0(JNIEnv* env, job
}
return (*env)->CallStaticObjectMethod(env, platformDSIClass, factoryMethod, dirbuf);
}
-
-#ifdef __sun
-#include <dlfcn.h>
-/* Sun's GLX implementation doesn't have glXGetProcAddressARB (or
- glXGetProcAddress) so we implement it here */
-void (*glXGetProcAddressARB(const char *procname))() {
- return (void (*)()) dlsym(RTLD_DEFAULT, procname);
-}
-#endif /* __ sun */