summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.opengl
diff options
context:
space:
mode:
authorBilly Biggs <bbiggs>2005-09-22 03:41:37 +0000
committerBilly Biggs <bbiggs>2005-09-22 03:41:37 +0000
commit0a933c3aab1914bb727c41886c17f13016b49dc5 (patch)
tree73c3f646c93e6bf108e3a4a628caaf9c299d61d7 /bundles/org.eclipse.swt.opengl
parent569b0d140a83252fae682474d086e376260b85d2 (diff)
downloadeclipse.platform.swt-0a933c3aab1914bb727c41886c17f13016b49dc5.tar.gz
eclipse.platform.swt-0a933c3aab1914bb727c41886c17f13016b49dc5.tar.xz
eclipse.platform.swt-0a933c3aab1914bb727c41886c17f13016b49dc5.zip
Free the pixel format structure.
Diffstat (limited to 'bundles/org.eclipse.swt.opengl')
-rw-r--r--bundles/org.eclipse.swt.opengl/carbon/library/agl.c10
-rw-r--r--bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.c5
-rw-r--r--bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.h1
-rw-r--r--bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/internal/opengl/carbon/AGL.java1
-rwxr-xr-xbundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/opengl/GLCanvas.java2
5 files changed, 16 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt.opengl/carbon/library/agl.c b/bundles/org.eclipse.swt.opengl/carbon/library/agl.c
index 341b8b3912..6b612c0697 100644
--- a/bundles/org.eclipse.swt.opengl/carbon/library/agl.c
+++ b/bundles/org.eclipse.swt.opengl/carbon/library/agl.c
@@ -71,6 +71,16 @@ JNIEXPORT jboolean JNICALL AGL_NATIVE(aglDestroyContext)
}
#endif
+#ifndef NO_aglDestroyPixelFormat
+JNIEXPORT void JNICALL AGL_NATIVE(aglDestroyPixelFormat)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ AGL_NATIVE_ENTER(env, that, aglDestroyPixelFormat_FUNC);
+ aglDestroyPixelFormat(arg0);
+ AGL_NATIVE_EXIT(env, that, aglDestroyPixelFormat_FUNC);
+}
+#endif
+
#ifndef NO_aglEnable
JNIEXPORT jboolean JNICALL AGL_NATIVE(aglEnable)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
diff --git a/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.c b/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.c
index 2f987b4a02..c1f016799f 100644
--- a/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.c
+++ b/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.c
@@ -14,13 +14,14 @@
#ifdef NATIVE_STATS
-int AGL_nativeFunctionCount = 13;
-int AGL_nativeFunctionCallCount[13];
+int AGL_nativeFunctionCount = 14;
+int AGL_nativeFunctionCallCount[14];
char * AGL_nativeFunctionNames[] = {
"aglChoosePixelFormat",
"aglCreateContext",
"aglDescribePixelFormat",
"aglDestroyContext",
+ "aglDestroyPixelFormat",
"aglEnable",
"aglGetCurrentContext",
"aglGetDrawable",
diff --git a/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.h b/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.h
index 80c0289079..fc359aff5c 100644
--- a/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.h
+++ b/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.h
@@ -25,6 +25,7 @@ typedef enum {
aglCreateContext_FUNC,
aglDescribePixelFormat_FUNC,
aglDestroyContext_FUNC,
+ aglDestroyPixelFormat_FUNC,
aglEnable_FUNC,
aglGetCurrentContext_FUNC,
aglGetDrawable_FUNC,
diff --git a/bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/internal/opengl/carbon/AGL.java b/bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/internal/opengl/carbon/AGL.java
index a1ee47ef22..3c1339e33e 100644
--- a/bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/internal/opengl/carbon/AGL.java
+++ b/bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/internal/opengl/carbon/AGL.java
@@ -50,6 +50,7 @@ public static final native int aglChoosePixelFormat(int gdevs, int ndev, int[] a
public static final native int aglCreateContext(int pix, int share);
public static final native boolean aglDescribePixelFormat(int pix, int attrib, int[] value);
public static final native boolean aglDestroyContext(int ctx);
+public static final native void aglDestroyPixelFormat(int pix);
public static final native boolean aglEnable(int ctx, int pname);
public static final native int aglGetCurrentContext();
public static final native int aglGetDrawable(int ctx);
diff --git a/bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/opengl/GLCanvas.java
index 6978091cd0..ebfc775bf3 100755
--- a/bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/opengl/GLCanvas.java
+++ b/bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/opengl/GLCanvas.java
@@ -113,7 +113,7 @@ public GLCanvas (Composite parent, int style, GLData data) {
switch (event.type) {
case SWT.Dispose:
AGL.aglDestroyContext (context);
- //AGL.aglDestroyPixelFormat (pixelFormat);
+ AGL.aglDestroyPixelFormat (pixelFormat);
break;
case SWT.Resize:
case SWT.Hide: