Mercurial > projects > dwt-win
annotate dwt/opengl/GLData.d @ 212:ab60f3309436
reverted the char[] to String and use the an alias.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:12:38 +0200 |
parents | 8d7572b6f3f6 |
children | fd9c62a2998e |
rev | line source |
---|---|
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
1 /******************************************************************************* |
126 | 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 * Port to the D Programming Language: | |
11 * John Reimer <terminal.node@gmail.com> | |
12 *******************************************************************************/ | |
13 module dwt.opengl.GLData; | |
14 | |
15 import tango.text.Util; | |
16 import tango.util.Convert; | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
17 import dwt.dwthelper.utils; |
126 | 18 |
19 /** | |
20 * The GLData class is a device-independent description | |
21 * of the pixel format attributes of a GL drawable. | |
22 * | |
23 * @see GLCanvas | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
24 * |
126 | 25 * @since 3.2 |
26 */ | |
27 | |
28 public class GLData { | |
29 /** | |
30 * Specifies a double-buffered surface. During context | |
31 * creation, only double-buffered formats are considered | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
32 * when set to true. |
126 | 33 */ |
34 public bool doubleBuffer; | |
35 | |
36 /** | |
37 * Specifies a stereo surface. During context creation, | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
38 * only stereo formats are considered when set to true. |
126 | 39 */ |
40 public bool stereo; | |
41 | |
42 /** | |
43 * The size in bits of the color buffer's red channel. | |
44 * During context creation, this specifies the minimum | |
45 * required red bits. | |
46 */ | |
47 public int redSize; | |
48 | |
49 /** | |
50 * The size in bits of the color buffer's green channel. | |
51 * During context creation, this specifies the minimum | |
52 * required green bits. | |
53 */ | |
54 public int greenSize; | |
55 | |
56 /** | |
57 * The size in bits of the color buffer's blue channel. | |
58 * During context creation, this specifies the minimum | |
59 * required blue bits. | |
60 */ | |
61 public int blueSize; | |
62 | |
63 /** | |
64 * The size in bits of the color buffer's alpha channel. | |
65 * During context creation, this specifies the minimum | |
66 * required alpha bits. | |
67 */ | |
68 public int alphaSize; | |
69 | |
70 /** | |
71 * The size in bits of the depth buffer. During context | |
72 * creation, the smallest depth buffer of at least the | |
73 * specified value is preferred, or zero for no depth | |
74 * buffer. | |
75 */ | |
76 public int depthSize; | |
77 | |
78 /** | |
79 * The desired number of stencil bitplanes. During | |
80 * context creation, the smallest stencil buffer of at | |
81 * least the specified value is preferred, or zero for | |
82 * no stencil buffer. | |
83 */ | |
84 public int stencilSize; | |
85 | |
86 /** | |
87 * The size in bits of the accumulation buffer's red | |
88 * channel. During context creation, this specifies the | |
89 * minimum required red bits. | |
90 */ | |
91 public int accumRedSize; | |
92 | |
93 /** | |
94 * The size in bits of the accumulation buffer's green | |
95 * channel. During context creation, this specifies the | |
96 * minimum required green bits. | |
97 */ | |
98 public int accumGreenSize; | |
99 | |
100 /** | |
101 * The size in bits of the accumulation buffer's blue | |
102 * channel. During context creation, this specifies the | |
103 * minimum required blue bits. | |
104 */ | |
105 public int accumBlueSize; | |
106 | |
107 /** | |
108 * The size in bits of the accumulation buffer's alpha | |
109 * channel. During context creation, this specifies the | |
110 * minimum required alpha bits. | |
111 */ | |
112 public int accumAlphaSize; | |
113 | |
114 /** | |
115 * The number of multisample buffers used by this context. | |
116 * During context creation, this specifies the minimum | |
117 * number of multisample buffers requested. | |
118 */ | |
119 public int sampleBuffers; | |
120 | |
121 /** | |
122 * The number of samples accepted in the multisample buffer. | |
123 * During creation, pixel formats with the smallest number of | |
124 * samples that meets or exceeds the specified minimum number | |
125 * are preferred. | |
126 */ | |
127 public int samples; | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
128 |
126 | 129 /** |
130 * Returns a string containing a concise, human-readable | |
131 * description of the receiver. | |
132 * | |
133 * @return a string representation of the data | |
134 */ | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
135 override public String toString() { |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
136 String string = doubleBuffer ? "doubleBuffer," : ""; |
126 | 137 string ~= stereo ? "stereo," : ""; |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
138 string ~= "r:" ~ to!(String)(redSize) ~ " g:" ~ to!(String)(greenSize) ~ |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
139 " b:" ~ to!(String)(blueSize) ~ " a:" ~ to!(String)(alphaSize) ~ "," ~ |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
140 "depth:" ~ to!(String)(depthSize) ~ ",stencil:" ~ to!(String)(stencilSize) ~ |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
141 ",accum r:" ~ to!(String)(accumRedSize) ~ "g:" ~ to!(String)(accumGreenSize) ~ |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
142 "b:" ~ to!(String)(accumBlueSize) ~ "a:" ~ to!(String)(accumAlphaSize) ~ |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
126
diff
changeset
|
143 ",sampleBuffers:" ~ to!(String)(sampleBuffers) ~ ",samples:" ~ to!(String)(samples); |
126 | 144 return string; |
145 } | |
146 } |