summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT OpenGL
diff options
context:
space:
mode:
authorSteve Northover <steve>2007-04-18 05:51:16 +0000
committerSteve Northover <steve>2007-04-18 05:51:16 +0000
commit0894512a66f007a1e9c59f8caa85551e06c6fecf (patch)
tree81c391a4bc3c0b92ad5c593179d2d0d6bc32b3de /bundles/org.eclipse.swt/Eclipse SWT OpenGL
parent529dfaeb1dac0294fc7a4e8b977712f62b45b864 (diff)
downloadeclipse.platform.swt-0894512a66f007a1e9c59f8caa85551e06c6fecf.tar.gz
eclipse.platform.swt-0894512a66f007a1e9c59f8caa85551e06c6fecf.tar.xz
eclipse.platform.swt-0894512a66f007a1e9c59f8caa85551e06c6fecf.zip
182810 - GLCanvas.isCurrent() always returns false on Windows
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT OpenGL')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java
index e53e611cb4..d599af3647 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java
@@ -90,9 +90,9 @@ public GLCanvas (Composite parent, int style, GLData data) {
Listener listener = new Listener () {
public void handleEvent (Event event) {
switch (event.type) {
- case SWT.Dispose:
- WGL.wglDeleteContext (context);
- break;
+ case SWT.Dispose:
+ WGL.wglDeleteContext (context);
+ break;
}
}
};
@@ -144,7 +144,7 @@ public GLData getGLData () {
*/
public boolean isCurrent () {
checkWidget ();
- return WGL.wglGetCurrentContext () == handle;
+ return WGL.wglGetCurrentContext () == context;
}
/**
@@ -158,7 +158,7 @@ public boolean isCurrent () {
*/
public void setCurrent () {
checkWidget ();
- if (WGL.wglGetCurrentContext () == handle) return;
+ if (WGL.wglGetCurrentContext () == context) return;
int hDC = OS.GetDC (handle);
WGL.wglMakeCurrent (hDC, context);
OS.ReleaseDC (handle, hDC);