aboutsummaryrefslogtreecommitdiffstats
path: root/make/glx-x11.cfg
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-01-22 03:38:03 +0000
committerKenneth Russel <[email protected]>2006-01-22 03:38:03 +0000
commit72acc211539803f1ef57d4331938afb48600398e (patch)
tree80d37e7c44d2c9a7bae74fc48434810526c8e80a /make/glx-x11.cfg
parentae26492c30051eb7c6c883b3c6397390f91afcae (diff)
Fixed Issue 173: Adjust gamma, brightness and contrast
Added com.sun.opengl.util.Gamma supporting adjusting of gamma, brightness, and contrast. API and implementation derived from code in the LWJGL project. Added demos.gamma.TestGamma demo illustrating how to use the APIs. Tested on Linux, Mac OS X and Windows. No Solaris support at this time, although future Solaris releases, being based on the Xorg server, will probably have support for the required XF86VidMode extension. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@557 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/glx-x11.cfg')
-rw-r--r--make/glx-x11.cfg26
1 files changed, 1 insertions, 25 deletions
diff --git a/make/glx-x11.cfg b/make/glx-x11.cfg
index fd381760e..801c035ee 100644
--- a/make/glx-x11.cfg
+++ b/make/glx-x11.cfg
@@ -15,37 +15,13 @@ CustomJavaCode GLX private static GLXProcAddressTable glxProcAddressTable = new
CustomJavaCode GLX public static GLXProcAddressTable getGLXProcAddressTable() { return glxProcAddressTable; }
CustomJavaCode GLX public static native long dlsym(String name);
-CustomCCode #include <inttypes.h>
-CustomCCode #include <X11/Xlib.h>
-CustomCCode #include <X11/Xutil.h>
-CustomCCode #include <GL/glx.h>
-CustomCCode /* Linux headers don't work properly */
-CustomCCode #define __USE_GNU
-CustomCCode #include <dlfcn.h>
-CustomCCode #undef __USE_GNU
+IncludeAs CustomCCode glx-CustomCCode.c
ArgumentIsString XOpenDisplay 0
# Need to expose DefaultScreen and RootWindow macros to Java
CustomJavaCode GLX public static native int DefaultScreen(long display);
CustomJavaCode GLX public static native long RootWindow(long display, int screen);
-CustomCCode JNIEXPORT jlong JNICALL
-CustomCCode Java_com_sun_opengl_impl_x11_GLX_DefaultScreen(JNIEnv *env, jclass _unused, jlong display) {
-CustomCCode return DefaultScreen((Display*) (intptr_t) display);
-CustomCCode }
-CustomCCode JNIEXPORT jlong JNICALL
-CustomCCode Java_com_sun_opengl_impl_x11_GLX_RootWindow(JNIEnv *env, jclass _unused, jlong display, jint screen) {
-CustomCCode return RootWindow((Display*) (intptr_t) display, screen);
-CustomCCode }
-CustomCCode JNIEXPORT jlong JNICALL
-CustomCCode Java_com_sun_opengl_impl_x11_GLX_dlsym(JNIEnv *env, jclass _unused, jstring name) {
-CustomCCode const jbyte* chars;
-CustomCCode void* res;
-CustomCCode chars = (*env)->GetStringUTFChars(env, name, NULL);
-CustomCCode res = dlsym(RTLD_DEFAULT, chars);
-CustomCCode (*env)->ReleaseStringUTFChars(env, name, chars);
-CustomCCode return (jlong) ((intptr_t) res);
-CustomCCode }
# Get returned array's capacity from XGetVisualInfo to be correct
TemporaryCVariableDeclaration XGetVisualInfo int count;