123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272 |
- #ifndef __khrplatform_h_
- #define __khrplatform_h_
- #if defined(_WIN32) && !defined(__SCITECH_SNAP__)
- # define KHRONOS_APICALL __declspec(dllimport)
- #elif defined (__SYMBIAN32__)
- # define KHRONOS_APICALL IMPORT_C
- #elif defined(ANDROID)
- # define KHRONOS_APICALL __attribute__((visibility("default")))
- #else
- # define KHRONOS_APICALL
- #endif
- #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
-
- # define KHRONOS_APIENTRY __stdcall
- #else
- # define KHRONOS_APIENTRY
- #endif
- #if defined (__ARMCC_2__)
- #define KHRONOS_APIATTRIBUTES __softfp
- #else
- #define KHRONOS_APIATTRIBUTES
- #endif
- #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
- #include <stdint.h>
- typedef int32_t khronos_int32_t;
- typedef uint32_t khronos_uint32_t;
- typedef int64_t khronos_int64_t;
- typedef uint64_t khronos_uint64_t;
- #define KHRONOS_SUPPORT_INT64 1
- #define KHRONOS_SUPPORT_FLOAT 1
- #elif defined(__VMS ) || defined(__sgi)
- #include <inttypes.h>
- typedef int32_t khronos_int32_t;
- typedef uint32_t khronos_uint32_t;
- typedef int64_t khronos_int64_t;
- typedef uint64_t khronos_uint64_t;
- #define KHRONOS_SUPPORT_INT64 1
- #define KHRONOS_SUPPORT_FLOAT 1
- #elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
- typedef __int32 khronos_int32_t;
- typedef unsigned __int32 khronos_uint32_t;
- typedef __int64 khronos_int64_t;
- typedef unsigned __int64 khronos_uint64_t;
- #define KHRONOS_SUPPORT_INT64 1
- #define KHRONOS_SUPPORT_FLOAT 1
- #elif defined(__sun__) || defined(__digital__)
- typedef int khronos_int32_t;
- typedef unsigned int khronos_uint32_t;
- #if defined(__arch64__) || defined(_LP64)
- typedef long int khronos_int64_t;
- typedef unsigned long int khronos_uint64_t;
- #else
- typedef long long int khronos_int64_t;
- typedef unsigned long long int khronos_uint64_t;
- #endif
- #define KHRONOS_SUPPORT_INT64 1
- #define KHRONOS_SUPPORT_FLOAT 1
- #elif 0
- typedef int khronos_int32_t;
- typedef unsigned int khronos_uint32_t;
- #define KHRONOS_SUPPORT_INT64 0
- #define KHRONOS_SUPPORT_FLOAT 0
- #else
- #include <stdint.h>
- typedef int32_t khronos_int32_t;
- typedef uint32_t khronos_uint32_t;
- typedef int64_t khronos_int64_t;
- typedef uint64_t khronos_uint64_t;
- #define KHRONOS_SUPPORT_INT64 1
- #define KHRONOS_SUPPORT_FLOAT 1
- #endif
- typedef signed char khronos_int8_t;
- typedef unsigned char khronos_uint8_t;
- typedef signed short int khronos_int16_t;
- typedef unsigned short int khronos_uint16_t;
- typedef signed long int khronos_intptr_t;
- typedef unsigned long int khronos_uintptr_t;
- typedef signed long int khronos_ssize_t;
- typedef unsigned long int khronos_usize_t;
- #if KHRONOS_SUPPORT_FLOAT
- typedef float khronos_float_t;
- #endif
- #if KHRONOS_SUPPORT_INT64
- typedef khronos_uint64_t khronos_utime_nanoseconds_t;
- typedef khronos_int64_t khronos_stime_nanoseconds_t;
- #endif
- #ifndef KHRONOS_MAX_ENUM
- #define KHRONOS_MAX_ENUM 0x7FFFFFFF
- #endif
- typedef enum {
- KHRONOS_FALSE = 0,
- KHRONOS_TRUE = 1,
- KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
- } khronos_boolean_enum_t;
- #endif
|