diff options
author | Billy Biggs <bbiggs> | 2005-11-16 17:37:46 +0000 |
---|---|---|
committer | Billy Biggs <bbiggs> | 2005-11-16 17:37:46 +0000 |
commit | f72bfdff3bc176627d604e0a70e04d5844399d73 (patch) | |
tree | 5a697aef40b30f247ab3fa379afd99a733d77b7d | |
parent | 01fdd7e3f1adc64a8d8c4b18817b82b5b7754553 (diff) | |
download | eclipse.platform.swt-f72bfdff3bc176627d604e0a70e04d5844399d73.tar.gz eclipse.platform.swt-f72bfdff3bc176627d604e0a70e04d5844399d73.tar.xz eclipse.platform.swt-f72bfdff3bc176627d604e0a70e04d5844399d73.zip |
115807 - [OpenGL] GLCanvas crashes on x86-64
6 files changed, 22 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.opengl.glx.GLX.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.opengl.glx.GLX.properties index f9c2d1c7d4..4c7a2c980f 100644 --- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.opengl.glx.GLX.properties +++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.opengl.glx.GLX.properties @@ -9,6 +9,8 @@ # IBM Corporation - initial API and implementation ############################################################################### org_eclipse_swt_internal_opengl_glx_GLX= +GLX_XVisualInfo_sizeof= + GLX_glGetIntegerv= GLX_glGetIntegerv_0=cast=(GLenum) GLX_glGetIntegerv_1=cast=(GLint *),flags=no_in diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c index 39dc88931a..8b197eafff 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c @@ -15,6 +15,18 @@ #define GLX_NATIVE(func) Java_org_eclipse_swt_internal_opengl_glx_GLX_##func +#ifndef NO_XVisualInfo_1sizeof +JNIEXPORT jint JNICALL GLX_NATIVE(XVisualInfo_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GLX_NATIVE_ENTER(env, that, XVisualInfo_1sizeof_FUNC); + rc = (jint)XVisualInfo_sizeof(); + GLX_NATIVE_EXIT(env, that, XVisualInfo_1sizeof_FUNC); + return rc; +} +#endif + #ifndef NO_glGetIntegerv JNIEXPORT void JNICALL GLX_NATIVE(glGetIntegerv) (JNIEnv *env, jclass that, jint arg0, jintArray arg1) diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c index e8f3bd006e..a59f11f6c0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c @@ -14,9 +14,10 @@ #ifdef NATIVE_STATS -int GLX_nativeFunctionCount = 22; -int GLX_nativeFunctionCallCount[22]; +int GLX_nativeFunctionCount = 23; +int GLX_nativeFunctionCallCount[23]; char * GLX_nativeFunctionNames[] = { + "XVisualInfo_1sizeof", "glGetIntegerv", "glViewport", "glXChooseVisual", diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h index 1e6f95823f..7619eaeb1c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h @@ -21,6 +21,7 @@ extern char* GLX_nativeFunctionNames[]; #endif typedef enum { + XVisualInfo_1sizeof_FUNC, glGetIntegerv_FUNC, glViewport_FUNC, glXChooseVisual_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java index cee28cc2c1..3890a51a16 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java @@ -200,6 +200,8 @@ public class GLX { * GL bits */ public static final int GL_VIEWPORT = 0x0BA2; + +public static final native int XVisualInfo_sizeof(); public static final native void glGetIntegerv(int pname, int[] params); public static final native void glViewport(int x, int y, int width, int height); diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/XVisualInfo.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/XVisualInfo.java index 04ee0aa15d..b2f849a098 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/XVisualInfo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/XVisualInfo.java @@ -11,7 +11,7 @@ package org.eclipse.swt.internal.opengl.glx; public class XVisualInfo { - public int visual; + public int /*long*/ visual; public int visualid; public int screen; public int depth; @@ -19,5 +19,5 @@ public class XVisualInfo { public int red_mask, green_mask, blue_mask; public int colormap_size; public int bits_per_rgb; - public static final int sizeof = 40; + public static final int sizeof = GLX.XVisualInfo_sizeof(); } |