summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.opengl
diff options
context:
space:
mode:
authorBilly Biggs <bbiggs>2005-09-22 16:16:07 +0000
committerBilly Biggs <bbiggs>2005-09-22 16:16:07 +0000
commitfcbdfdad3d3eb9551eadbb1c36642789cf75465e (patch)
tree8e6d277b24f104b294a0a8c12922a5fae122c942 /bundles/org.eclipse.swt.opengl
parentaca4e77df0d7b144f3674d8789991358f3b6c432 (diff)
downloadeclipse.platform.swt-fcbdfdad3d3eb9551eadbb1c36642789cf75465e.tar.gz
eclipse.platform.swt-fcbdfdad3d3eb9551eadbb1c36642789cf75465e.tar.xz
eclipse.platform.swt-fcbdfdad3d3eb9551eadbb1c36642789cf75465e.zip
Move the GL binding to the more generic package org.eclipse.opengl.
Diffstat (limited to 'bundles/org.eclipse.swt.opengl')
-rw-r--r--bundles/org.eclipse.swt.opengl/common/library/gl.c2
-rw-r--r--bundles/org.eclipse.swt.opengl/common/library/glu.c2
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.swt.opengl/common/org/eclipse/opengl/GL.java (renamed from bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GL.java)2
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.swt.opengl/common/org/eclipse/opengl/GLU.java (renamed from bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLU.java)2
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLCanvas.java4
5 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt.opengl/common/library/gl.c b/bundles/org.eclipse.swt.opengl/common/library/gl.c
index 20a3b2d568..18b5e9fd2a 100644
--- a/bundles/org.eclipse.swt.opengl/common/library/gl.c
+++ b/bundles/org.eclipse.swt.opengl/common/library/gl.c
@@ -2,7 +2,7 @@
#include "gl_structs.h"
#include "gl_stats.h"
-#define GL_NATIVE(func) Java_org_eclipse_swt_opengl_GL_##func
+#define GL_NATIVE(func) Java_org_eclipse_opengl_GL_##func
#ifndef NO_glAccum
JNIEXPORT void JNICALL GL_NATIVE(glAccum)
diff --git a/bundles/org.eclipse.swt.opengl/common/library/glu.c b/bundles/org.eclipse.swt.opengl/common/library/glu.c
index 3abf7d4047..5ef7075bce 100644
--- a/bundles/org.eclipse.swt.opengl/common/library/glu.c
+++ b/bundles/org.eclipse.swt.opengl/common/library/glu.c
@@ -2,7 +2,7 @@
#include "glu_structs.h"
#include "glu_stats.h"
-#define GLU_NATIVE(func) Java_org_eclipse_swt_opengl_GLU_##func
+#define GLU_NATIVE(func) Java_org_eclipse_opengl_GLU_##func
#ifndef NO_gluBeginCurve
JNIEXPORT void JNICALL GLU_NATIVE(gluBeginCurve)
diff --git a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GL.java b/bundles/org.eclipse.swt.opengl/common/org/eclipse/opengl/GL.java
index 3a35dec65d..01a4fca4c3 100644..100755
--- a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GL.java
+++ b/bundles/org.eclipse.swt.opengl/common/org/eclipse/opengl/GL.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.opengl;
+package org.eclipse.opengl;
public class GL {
diff --git a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLU.java b/bundles/org.eclipse.swt.opengl/common/org/eclipse/opengl/GLU.java
index b63f88ae4f..4c1e333d45 100644..100755
--- a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLU.java
+++ b/bundles/org.eclipse.swt.opengl/common/org/eclipse/opengl/GLU.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.opengl;
+package org.eclipse.opengl;
public class GLU {
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 754895f4d6..113f3ed8f9 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
@@ -5,6 +5,7 @@ import org.eclipse.swt.widgets.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.gtk.*;
import org.eclipse.swt.internal.opengl.gtk.*;
+import org.eclipse.opengl.*;
/**
* GLCanvas is a widget capable of displaying OpenGL content.
@@ -147,6 +148,9 @@ public GLCanvas (Composite parent, int style, GLData data) {
break;
case SWT.Dispose:
if (context != 0) {
+ if (GLX.glXGetCurrentContext () == context) {
+ GLX.glXMakeCurrent(xdisplay, 0, 0);
+ }
GLX.glXDestroyContext (xdisplay, context);
context = 0;
}