comparison dwt/opengl/GLData.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children d8635bb48c7c
comparison
equal deleted inserted replaced
-1:000000000000 0:380af2bdd8e5
1 /*******************************************************************************
2 * Copyright (c) 2005, 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 module dwt.opengl.GLData;
12
13 import dwt.dwthelper.utils;
14
15 /**
16 * The GLData class is a device-independent description
17 * of the pixel format attributes of a GL drawable.
18 *
19 * @see GLCanvas
20 *
21 * @since 3.2
22 */
23
24 public class GLData {
25 /**
26 * Specifies a double-buffered surface. During context
27 * creation, only double-buffered formats are considered
28 * when set to true.
29 */
30 public bool doubleBuffer;
31
32 /**
33 * Specifies a stereo surface. During context creation,
34 * only stereo formats are considered when set to true.
35 */
36 public bool stereo;
37
38 /**
39 * The size in bits of the color buffer's red channel.
40 * During context creation, this specifies the minimum
41 * required red bits.
42 */
43 public int redSize;
44
45 /**
46 * The size in bits of the color buffer's green channel.
47 * During context creation, this specifies the minimum
48 * required green bits.
49 */
50 public int greenSize;
51
52 /**
53 * The size in bits of the color buffer's blue channel.
54 * During context creation, this specifies the minimum
55 * required blue bits.
56 */
57 public int blueSize;
58
59 /**
60 * The size in bits of the color buffer's alpha channel.
61 * During context creation, this specifies the minimum
62 * required alpha bits.
63 */
64 public int alphaSize;
65
66 /**
67 * The size in bits of the depth buffer. During context
68 * creation, the smallest depth buffer of at least the
69 * specified value is preferred, or zero for no depth
70 * buffer.
71 */
72 public int depthSize;
73
74 /**
75 * The desired number of stencil bitplanes. During
76 * context creation, the smallest stencil buffer of at
77 * least the specified value is preferred, or zero for
78 * no stencil buffer.
79 */
80 public int stencilSize;
81
82 /**
83 * The size in bits of the accumulation buffer's red
84 * channel. During context creation, this specifies the
85 * minimum required red bits.
86 */
87 public int accumRedSize;
88
89 /**
90 * The size in bits of the accumulation buffer's green
91 * channel. During context creation, this specifies the
92 * minimum required green bits.
93 */
94 public int accumGreenSize;
95
96 /**
97 * The size in bits of the accumulation buffer's blue
98 * channel. During context creation, this specifies the
99 * minimum required blue bits.
100 */
101 public int accumBlueSize;
102
103 /**
104 * The size in bits of the accumulation buffer's alpha
105 * channel. During context creation, this specifies the
106 * minimum required alpha bits.
107 */
108 public int accumAlphaSize;
109
110 /**
111 * The number of multisample buffers used by this context.
112 * During context creation, this specifies the minimum
113 * number of multisample buffers requested.
114 */
115 public int sampleBuffers;
116
117 /**
118 * The number of samples accepted in the multisample buffer.
119 * During creation, pixel formats with the smallest number of
120 * samples that meets or exceeds the specified minimum number
121 * are preferred.
122 */
123 public int samples;
124
125 /**
126 * Returns a string containing a concise, human-readable
127 * description of the receiver.
128 *
129 * @return a string representation of the data
130 */
131 public String toString() {
132 return (doubleBuffer ? "doubleBuffer," : "") +
133 (stereo ? "stereo," : "") +
134 "r:" + redSize + " g:" + greenSize + " b:" + blueSize + " a:" + alphaSize + "," +
135 "depth:" + depthSize + ",stencil:" + stencilSize +
136 ",accum r:" + accumRedSize + "g:" + accumGreenSize + "b:" + accumBlueSize + "a:" + accumAlphaSize +
137 ",sampleBuffers:" + sampleBuffers + ",samples:" + samples;
138 }
139 }