Mercurial > projects > dwt-win
comparison 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 |
comparison
equal
deleted
inserted
replaced
211:ff59aeb96cac | 212:ab60f3309436 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2005, 2006 IBM Corporation and others. | 2 * Copyright (c) 2005, 2006 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
12 *******************************************************************************/ | 12 *******************************************************************************/ |
13 module dwt.opengl.GLData; | 13 module dwt.opengl.GLData; |
14 | 14 |
15 import tango.text.Util; | 15 import tango.text.Util; |
16 import tango.util.Convert; | 16 import tango.util.Convert; |
17 import dwt.dwthelper.utils; | |
17 | 18 |
18 /** | 19 /** |
19 * The GLData class is a device-independent description | 20 * The GLData class is a device-independent description |
20 * of the pixel format attributes of a GL drawable. | 21 * of the pixel format attributes of a GL drawable. |
21 * | 22 * |
22 * @see GLCanvas | 23 * @see GLCanvas |
23 * | 24 * |
24 * @since 3.2 | 25 * @since 3.2 |
25 */ | 26 */ |
26 | 27 |
27 public class GLData { | 28 public class GLData { |
28 /** | 29 /** |
29 * Specifies a double-buffered surface. During context | 30 * Specifies a double-buffered surface. During context |
30 * creation, only double-buffered formats are considered | 31 * creation, only double-buffered formats are considered |
31 * when set to true. | 32 * when set to true. |
32 */ | 33 */ |
33 public bool doubleBuffer; | 34 public bool doubleBuffer; |
34 | 35 |
35 /** | 36 /** |
36 * Specifies a stereo surface. During context creation, | 37 * Specifies a stereo surface. During context creation, |
37 * only stereo formats are considered when set to true. | 38 * only stereo formats are considered when set to true. |
38 */ | 39 */ |
39 public bool stereo; | 40 public bool stereo; |
40 | 41 |
41 /** | 42 /** |
42 * The size in bits of the color buffer's red channel. | 43 * The size in bits of the color buffer's red channel. |
122 * During creation, pixel formats with the smallest number of | 123 * During creation, pixel formats with the smallest number of |
123 * samples that meets or exceeds the specified minimum number | 124 * samples that meets or exceeds the specified minimum number |
124 * are preferred. | 125 * are preferred. |
125 */ | 126 */ |
126 public int samples; | 127 public int samples; |
127 | 128 |
128 /** | 129 /** |
129 * Returns a string containing a concise, human-readable | 130 * Returns a string containing a concise, human-readable |
130 * description of the receiver. | 131 * description of the receiver. |
131 * | 132 * |
132 * @return a string representation of the data | 133 * @return a string representation of the data |
133 */ | 134 */ |
134 override public char[] toString() { | 135 override public String toString() { |
135 char[] string = doubleBuffer ? "doubleBuffer," : ""; | 136 String string = doubleBuffer ? "doubleBuffer," : ""; |
136 string ~= stereo ? "stereo," : ""; | 137 string ~= stereo ? "stereo," : ""; |
137 string ~= "r:" ~ to!(char[])(redSize) ~ " g:" ~ to!(char[])(greenSize) ~ | 138 string ~= "r:" ~ to!(String)(redSize) ~ " g:" ~ to!(String)(greenSize) ~ |
138 " b:" ~ to!(char[])(blueSize) ~ " a:" ~ to!(char[])(alphaSize) ~ "," ~ | 139 " b:" ~ to!(String)(blueSize) ~ " a:" ~ to!(String)(alphaSize) ~ "," ~ |
139 "depth:" ~ to!(char[])(depthSize) ~ ",stencil:" ~ to!(char[])(stencilSize) ~ | 140 "depth:" ~ to!(String)(depthSize) ~ ",stencil:" ~ to!(String)(stencilSize) ~ |
140 ",accum r:" ~ to!(char[])(accumRedSize) ~ "g:" ~ to!(char[])(accumGreenSize) ~ | 141 ",accum r:" ~ to!(String)(accumRedSize) ~ "g:" ~ to!(String)(accumGreenSize) ~ |
141 "b:" ~ to!(char[])(accumBlueSize) ~ "a:" ~ to!(char[])(accumAlphaSize) ~ | 142 "b:" ~ to!(String)(accumBlueSize) ~ "a:" ~ to!(String)(accumAlphaSize) ~ |
142 ",sampleBuffers:" ~ to!(char[])(sampleBuffers) ~ ",samples:" ~ to!(char[])(samples); | 143 ",sampleBuffers:" ~ to!(String)(sampleBuffers) ~ ",samples:" ~ to!(String)(samples); |
143 return string; | 144 return string; |
144 } | 145 } |
145 } | 146 } |