01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.swt.internal.opengl.carbon;
11:
12: import org.eclipse.swt.opengl.Library;
13:
14: public class AGL {
15:
16: static {
17: Library.loadLibrary("gl");
18: }
19:
20: /* Attributes */
21: public static final int AGL_NONE = 0;
22: public static final int AGL_BUFFER_SIZE = 2;
23: public static final int AGL_LEVEL = 3;
24: public static final int AGL_RGBA = 4;
25: public static final int AGL_DOUBLEBUFFER = 5;
26: public static final int AGL_STEREO = 6;
27: public static final int AGL_AUX_BUFFERS = 7;
28: public static final int AGL_RED_SIZE = 8;
29: public static final int AGL_GREEN_SIZE = 9;
30: public static final int AGL_BLUE_SIZE = 10;
31: public static final int AGL_ALPHA_SIZE = 11;
32: public static final int AGL_DEPTH_SIZE = 12;
33: public static final int AGL_STENCIL_SIZE = 13;
34: public static final int AGL_ACCUM_RED_SIZE = 14;
35: public static final int AGL_ACCUM_GREEN_SIZE = 15;
36: public static final int AGL_ACCUM_BLUE_SIZE = 16;
37: public static final int AGL_ACCUM_ALPHA_SIZE = 17;
38:
39: public static final int AGL_SAMPLE_BUFFERS_ARB = 55;
40: public static final int AGL_SAMPLES_ARB = 56;
41:
42: /* Integer parameters */
43: public static final int AGL_BUFFER_RECT = 202;
44: public static final int AGL_SWAP_INTERVAL = 222;
45: public static final int AGL_BUFFER_NAME = 231;
46: public static final int AGL_CLIP_REGION = 254;
47:
48: public static final native int aglChoosePixelFormat(int gdevs,
49: int ndev, int[] attribs);
50:
51: public static final native int aglCreateContext(int pix, int share);
52:
53: public static final native boolean aglDescribePixelFormat(int pix,
54: int attrib, int[] value);
55:
56: public static final native boolean aglDestroyContext(int ctx);
57:
58: public static final native void aglDestroyPixelFormat(int pix);
59:
60: public static final native boolean aglEnable(int ctx, int pname);
61:
62: public static final native int aglGetCurrentContext();
63:
64: public static final native int aglGetDrawable(int ctx);
65:
66: public static final native boolean aglSetCurrentContext(int ctx);
67:
68: public static final native boolean aglSetDrawable(int ctx, int draw);
69:
70: public static final native boolean aglSetInteger(int ctx,
71: int pname, int[] params);
72:
73: public static final native boolean aglSetInteger(int ctx,
74: int pname, int param);
75:
76: public static final native void aglSwapBuffers(int ctx);
77:
78: public static final native boolean aglUpdateContext(int ctx);
79: }
|