OLD | NEW |
1 #ifndef __khrplatform_h_ | 1 #ifndef __khrplatform_h_ |
2 #define __khrplatform_h_ | 2 #define __khrplatform_h_ |
3 | 3 |
4 /* | 4 /* |
5 ** Copyright (c) 2008-2009 The Khronos Group Inc. | 5 ** Copyright (c) 2008-2009 The Khronos Group Inc. |
6 ** | 6 ** |
7 ** Permission is hereby granted, free of charge, to any person obtaining a | 7 ** Permission is hereby granted, free of charge, to any person obtaining a |
8 ** copy of this software and/or associated documentation files (the | 8 ** copy of this software and/or associated documentation files (the |
9 ** "Materials"), to deal in the Materials without restriction, including | 9 ** "Materials"), to deal in the Materials without restriction, including |
10 ** without limitation the rights to use, copy, modify, merge, publish, | 10 ** without limitation the rights to use, copy, modify, merge, publish, |
11 ** distribute, sublicense, and/or sell copies of the Materials, and to | 11 ** distribute, sublicense, and/or sell copies of the Materials, and to |
12 ** permit persons to whom the Materials are furnished to do so, subject to | 12 ** permit persons to whom the Materials are furnished to do so, subject to |
13 ** the following conditions: | 13 ** the following conditions: |
14 ** | 14 ** |
15 ** The above copyright notice and this permission notice shall be included | 15 ** The above copyright notice and this permission notice shall be included |
16 ** in all copies or substantial portions of the Materials. | 16 ** in all copies or substantial portions of the Materials. |
17 ** | 17 ** |
18 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | 18 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
19 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | 19 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
20 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | 20 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
21 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | 21 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
22 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | 22 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
23 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | 23 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
24 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. | 24 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
25 */ | 25 */ |
26 | 26 |
27 /* Khronos platform-specific types and definitions. | 27 /* Khronos platform-specific types and definitions. |
28 * | 28 * |
29 * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ | 29 * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ |
30 * | 30 * |
31 * Adopters may modify this file to suit their platform. Adopters are | 31 * Adopters may modify this file to suit their platform. Adopters are |
32 * encouraged to submit platform specific modifications to the Khronos | 32 * encouraged to submit platform specific modifications to the Khronos |
33 * group so that they can be included in future versions of this file. | 33 * group so that they can be included in future versions of this file. |
34 * Please submit changes by sending them to the public Khronos Bugzilla | 34 * Please submit changes by sending them to the public Khronos Bugzilla |
35 * (http://khronos.org/bugzilla) by filing a bug against product | 35 * (http://khronos.org/bugzilla) by filing a bug against product |
36 * "Khronos (general)" component "Registry". | 36 * "Khronos (general)" component "Registry". |
37 * | 37 * |
38 * A predefined template which fills in some of the bug fields can be | 38 * A predefined template which fills in some of the bug fields can be |
39 * reached using http://tinyurl.com/khrplatform-h-bugreport, but you | 39 * reached using http://tinyurl.com/khrplatform-h-bugreport, but you |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 #endif | 224 #endif |
225 | 225 |
226 | 226 |
227 /* | 227 /* |
228 * Types that are (so far) the same on all platforms | 228 * Types that are (so far) the same on all platforms |
229 */ | 229 */ |
230 typedef signed char khronos_int8_t; | 230 typedef signed char khronos_int8_t; |
231 typedef unsigned char khronos_uint8_t; | 231 typedef unsigned char khronos_uint8_t; |
232 typedef signed short int khronos_int16_t; | 232 typedef signed short int khronos_int16_t; |
233 typedef unsigned short int khronos_uint16_t; | 233 typedef unsigned short int khronos_uint16_t; |
| 234 |
| 235 /* |
| 236 * Types that differ between LLP64 and LP64 architectures - in LLP64, |
| 237 * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears |
| 238 * to be the only LLP64 architecture in current use. |
| 239 */ |
| 240 #ifdef _WIN64 |
| 241 typedef signed long long int khronos_intptr_t; |
| 242 typedef unsigned long long int khronos_uintptr_t; |
| 243 typedef signed long long int khronos_ssize_t; |
| 244 typedef unsigned long long int khronos_usize_t; |
| 245 #else |
234 typedef signed long int khronos_intptr_t; | 246 typedef signed long int khronos_intptr_t; |
235 typedef unsigned long int khronos_uintptr_t; | 247 typedef unsigned long int khronos_uintptr_t; |
236 typedef signed long int khronos_ssize_t; | 248 typedef signed long int khronos_ssize_t; |
237 typedef unsigned long int khronos_usize_t; | 249 typedef unsigned long int khronos_usize_t; |
| 250 #endif |
238 | 251 |
239 #if KHRONOS_SUPPORT_FLOAT | 252 #if KHRONOS_SUPPORT_FLOAT |
240 /* | 253 /* |
241 * Float type | 254 * Float type |
242 */ | 255 */ |
243 typedef float khronos_float_t; | 256 typedef float khronos_float_t; |
244 #endif | 257 #endif |
245 | 258 |
246 #if KHRONOS_SUPPORT_INT64 | 259 #if KHRONOS_SUPPORT_INT64 |
247 /* Time types | 260 /* Time types |
(...skipping 22 matching lines...) Expand all Loading... |
270 * Values other than zero should be considered to be true. Therefore | 283 * Values other than zero should be considered to be true. Therefore |
271 * comparisons should not be made against KHRONOS_TRUE. | 284 * comparisons should not be made against KHRONOS_TRUE. |
272 */ | 285 */ |
273 typedef enum { | 286 typedef enum { |
274 KHRONOS_FALSE = 0, | 287 KHRONOS_FALSE = 0, |
275 KHRONOS_TRUE = 1, | 288 KHRONOS_TRUE = 1, |
276 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM | 289 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM |
277 } khronos_boolean_enum_t; | 290 } khronos_boolean_enum_t; |
278 | 291 |
279 #endif /* __khrplatform_h_ */ | 292 #endif /* __khrplatform_h_ */ |
OLD | NEW |