diff options
author | Billy Biggs <bbiggs> | 2005-09-17 20:12:01 +0000 |
---|---|---|
committer | Billy Biggs <bbiggs> | 2005-09-17 20:12:01 +0000 |
commit | 5fc04d0d437c4b5875da999f39e4c0f4ac1b0ebf (patch) | |
tree | a7c267fb05a6c4796be806ddbf9df9acd30095b3 /bundles/org.eclipse.swt.opengl | |
parent | c168dad7970fd3069912df74f106ebdbb22ce1dd (diff) | |
download | eclipse.platform.swt-5fc04d0d437c4b5875da999f39e4c0f4ac1b0ebf.tar.gz eclipse.platform.swt-5fc04d0d437c4b5875da999f39e4c0f4ac1b0ebf.tar.xz eclipse.platform.swt-5fc04d0d437c4b5875da999f39e4c0f4ac1b0ebf.zip |
Fix broken attribute list.
Diffstat (limited to 'bundles/org.eclipse.swt.opengl')
-rw-r--r-- | bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLCanvas.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLCanvas.java index af7dc7ba09..060d8d331d 100644 --- a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLCanvas.java +++ b/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLCanvas.java @@ -25,9 +25,7 @@ public GLCanvas (Composite parent, int style, GLFormatData data) { xdisplay = OS.gdk_x11_drawable_get_xdisplay (window); int xscreen = OS.XDefaultScreen (xdisplay); - glxAttrib [pos++] = GLX.GLX_LEVEL; - glxAttrib [pos++] = 0; - glxAttrib [pos++] = GLX.GLX_RGBA; + glxAttrib [pos++] = GLX.GLX_RGBA; if (data.doubleBuffer) glxAttrib [pos++] = GLX.GLX_DOUBLEBUFFER; if (data.stereo) glxAttrib [pos++] = GLX.GLX_STEREO; if (data.redSize > 0) { @@ -42,6 +40,10 @@ public GLCanvas (Composite parent, int style, GLFormatData data) { glxAttrib [pos++] = GLX.GLX_BLUE_SIZE; glxAttrib [pos++] = data.blueSize; } + if (data.alphaSize > 0) { + glxAttrib [pos++] = GLX.GLX_ALPHA_SIZE; + glxAttrib [pos++] = data.alphaSize; + } if (data.depthSize > 0) { glxAttrib [pos++] = GLX.GLX_DEPTH_SIZE; glxAttrib [pos++] = data.depthSize; @@ -74,7 +76,7 @@ public GLCanvas (Composite parent, int style, GLFormatData data) { glxAttrib [pos++] = GLX.GLX_SAMPLES; glxAttrib [pos++] = data.samples; } - glxAttrib [pos++] = GLX.GLX_NONE; + glxAttrib [pos++] = 0; int infoPtr = GLX.glXChooseVisual (xdisplay, xscreen, glxAttrib); if (infoPtr == 0) SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH); XVisualInfo info = new XVisualInfo (); |