summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.opengl
diff options
context:
space:
mode:
authorBilly Biggs <bbiggs>2005-09-21 17:18:53 +0000
committerBilly Biggs <bbiggs>2005-09-21 17:18:53 +0000
commit803af91b2502e0be5abf9c99c3a910ce8743a2fa (patch)
treedce86c3cff5d646d2e17e3b6677d23c7716f7969 /bundles/org.eclipse.swt.opengl
parent7affb42577c2f1e6edb344cc2cbf777b3e9c722c (diff)
downloadeclipse.platform.swt-803af91b2502e0be5abf9c99c3a910ce8743a2fa.tar.gz
eclipse.platform.swt-803af91b2502e0be5abf9c99c3a910ce8743a2fa.tar.xz
eclipse.platform.swt-803af91b2502e0be5abf9c99c3a910ce8743a2fa.zip
Add aglGetDrawable.
Diffstat (limited to 'bundles/org.eclipse.swt.opengl')
-rw-r--r--bundles/org.eclipse.swt.opengl/carbon/library/agl.c12
-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.java5
4 files changed, 21 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt.opengl/carbon/library/agl.c b/bundles/org.eclipse.swt.opengl/carbon/library/agl.c
index 2434984c00..341b8b3912 100644
--- a/bundles/org.eclipse.swt.opengl/carbon/library/agl.c
+++ b/bundles/org.eclipse.swt.opengl/carbon/library/agl.c
@@ -95,6 +95,18 @@ JNIEXPORT jint JNICALL AGL_NATIVE(aglGetCurrentContext)
}
#endif
+#ifndef NO_aglGetDrawable
+JNIEXPORT jint JNICALL AGL_NATIVE(aglGetDrawable)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ jint rc = 0;
+ AGL_NATIVE_ENTER(env, that, aglGetDrawable_FUNC);
+ rc = (jint)aglGetDrawable(arg0);
+ AGL_NATIVE_EXIT(env, that, aglGetDrawable_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_aglSetCurrentContext
JNIEXPORT jboolean JNICALL AGL_NATIVE(aglSetCurrentContext)
(JNIEnv *env, jclass that, jint arg0)
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 2d26396cb6..2f987b4a02 100644
--- a/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.c
+++ b/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.c
@@ -14,8 +14,8 @@
#ifdef NATIVE_STATS
-int AGL_nativeFunctionCount = 12;
-int AGL_nativeFunctionCallCount[12];
+int AGL_nativeFunctionCount = 13;
+int AGL_nativeFunctionCallCount[13];
char * AGL_nativeFunctionNames[] = {
"aglChoosePixelFormat",
"aglCreateContext",
@@ -23,6 +23,7 @@ char * AGL_nativeFunctionNames[] = {
"aglDestroyContext",
"aglEnable",
"aglGetCurrentContext",
+ "aglGetDrawable",
"aglSetCurrentContext",
"aglSetDrawable",
"aglSetInteger__III",
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 00ded539fc..80c0289079 100644
--- a/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.h
+++ b/bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.h
@@ -27,6 +27,7 @@ typedef enum {
aglDestroyContext_FUNC,
aglEnable_FUNC,
aglGetCurrentContext_FUNC,
+ aglGetDrawable_FUNC,
aglSetCurrentContext_FUNC,
aglSetDrawable_FUNC,
aglSetInteger__III_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 7e453a913a..a1ee47ef22 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
@@ -18,6 +18,7 @@ static {
Library.loadLibrary("gl");
}
+/* Attributes */
public static final int AGL_NONE = 0;
public static final int AGL_BUFFER_SIZE = 2;
public static final int AGL_LEVEL = 3;
@@ -39,7 +40,10 @@ public static final int AGL_ACCUM_ALPHA_SIZE = 17;
public static final int AGL_SAMPLE_BUFFERS_ARB = 55;
public static final int AGL_SAMPLES_ARB = 56;
+/* Integer parameters */
public static final int AGL_BUFFER_RECT = 202;
+public static final int AGL_SWAP_INTERVAL = 222;
+public static final int AGL_BUFFER_NAME = 231;
public static final int AGL_CLIP_REGION = 254;
public static final native int aglChoosePixelFormat(int gdevs, int ndev, int[] attribs);
@@ -48,6 +52,7 @@ public static final native boolean aglDescribePixelFormat(int pix, int attrib, i
public static final native boolean aglDestroyContext(int ctx);
public static final native boolean aglEnable(int ctx, int pname);
public static final native int aglGetCurrentContext();
+public static final native int aglGetDrawable(int ctx);
public static final native boolean aglSetCurrentContext(int ctx);
public static final native boolean aglSetDrawable(int ctx, int draw);
public static final native boolean aglSetInteger(int ctx, int pname, int[] params);