36 #define OGRE_PLATFORM_WIN32 1
37 #define OGRE_PLATFORM_LINUX 2
38 #define OGRE_PLATFORM_APPLE 3
39 #define OGRE_PLATFORM_APPLE_IOS 4
40 #define OGRE_PLATFORM_ANDROID 5
41 #define OGRE_PLATFORM_NACL 6
43 #define OGRE_COMPILER_MSVC 1
44 #define OGRE_COMPILER_GNUC 2
45 #define OGRE_COMPILER_BORL 3
46 #define OGRE_COMPILER_WINSCW 4
47 #define OGRE_COMPILER_GCCE 5
48 #define OGRE_COMPILER_CLANG 6
50 #define OGRE_ENDIAN_LITTLE 1
51 #define OGRE_ENDIAN_BIG 2
53 #define OGRE_ARCHITECTURE_32 1
54 #define OGRE_ARCHITECTURE_64 2
58 #if defined( __GCCE__ )
59 # define OGRE_COMPILER OGRE_COMPILER_GCCE
60 # define OGRE_COMP_VER _MSC_VER
62 #elif defined( __WINSCW__ )
63 # define OGRE_COMPILER OGRE_COMPILER_WINSCW
64 # define OGRE_COMP_VER _MSC_VER
65 #elif defined( _MSC_VER )
66 # define OGRE_COMPILER OGRE_COMPILER_MSVC
67 # define OGRE_COMP_VER _MSC_VER
68 #elif defined( __clang__ )
69 # define OGRE_COMPILER OGRE_COMPILER_CLANG
70 # define OGRE_COMP_VER (((__clang_major__)*100) + \
71 (__clang_minor__*10) + \
73 #elif defined( __GNUC__ )
74 # define OGRE_COMPILER OGRE_COMPILER_GNUC
75 # define OGRE_COMP_VER (((__GNUC__)*100) + \
76 (__GNUC_MINOR__*10) + \
78 #elif defined( __BORLANDC__ )
79 # define OGRE_COMPILER OGRE_COMPILER_BORL
80 # define OGRE_COMP_VER __BCPLUSPLUS__
81 # define __FUNCTION__ __FUNC__
83 # pragma error "No known compiler. Abort! Abort!"
88 #if OGRE_COMPILER == OGRE_COMPILER_MSVC
89 # if OGRE_COMP_VER >= 1200
90 # define FORCEINLINE __forceinline
92 #elif defined(__MINGW32__)
93 # if !defined(FORCEINLINE)
94 # define FORCEINLINE __inline
97 # define FORCEINLINE __inline
102 #if defined( __WIN32__ ) || defined( _WIN32 )
103 # define OGRE_PLATFORM OGRE_PLATFORM_WIN32
104 #elif defined( __APPLE_CC__)
107 # if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40000 || __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000
108 # define OGRE_PLATFORM OGRE_PLATFORM_APPLE_IOS
110 # define OGRE_PLATFORM OGRE_PLATFORM_APPLE
112 #elif defined(__ANDROID__)
113 # define OGRE_PLATFORM OGRE_PLATFORM_ANDROID
114 #elif defined( __native_client__ )
115 # define OGRE_PLATFORM OGRE_PLATFORM_NACL
116 # ifndef OGRE_STATIC_LIB
117 # error OGRE must be built as static for NaCl (OGRE_STATIC=true in CMake)
119 # ifdef OGRE_BUILD_RENDERSYSTEM_D3D9
120 # error D3D9 is not supported on NaCl (OGRE_BUILD_RENDERSYSTEM_D3D9 false in CMake)
122 # ifdef OGRE_BUILD_RENDERSYSTEM_GL
123 # error OpenGL is not supported on NaCl (OGRE_BUILD_RENDERSYSTEM_GL=false in CMake)
125 # ifndef OGRE_BUILD_RENDERSYSTEM_GLES2
126 # error GLES2 render system is required for NaCl (OGRE_BUILD_RENDERSYSTEM_GLES2=false in CMake)
129 # define OGRE_PLATFORM OGRE_PLATFORM_LINUX
133 #if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
134 # define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_64
136 # define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_32
142 #define OGRE_QUOTE_INPLACE(x) # x
143 #define OGRE_QUOTE(x) OGRE_QUOTE_INPLACE(x)
144 #define OGRE_WARN( x ) message( __FILE__ "(" QUOTE( __LINE__ ) ") : " x "\n" )
148 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
152 # if defined( OGRE_STATIC_LIB )
155 # define _OgrePrivate
157 # if defined( OGRE_NONCLIENT_BUILD )
158 # define _OgreExport __declspec( dllexport )
160 # if defined( __MINGW32__ )
163 # define _OgreExport __declspec( dllimport )
166 # define _OgrePrivate
170 # if defined(_DEBUG) || defined(DEBUG)
171 # define OGRE_DEBUG_MODE 1
173 # define OGRE_DEBUG_MODE 0
180 #if defined(__MINGW32__)
181 # if OGRE_COMP_VER < 400
182 # if !defined(_STLPORT_VERSION)
184 # if defined(__MINGW32_TOOLBOX_UNICODE__) || OGRE_COMP_VER > 345
185 # define OGRE_UNICODE_SUPPORT 1
187 # define OGRE_UNICODE_SUPPORT 0
190 # define OGRE_UNICODE_SUPPORT 1
193 # define OGRE_UNICODE_SUPPORT 1
196 # define OGRE_UNICODE_SUPPORT 1
199 #endif // OGRE_PLATFORM == OGRE_PLATFORM_WIN32
225 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS || \
226 OGRE_PLATFORM == OGRE_PLATFORM_ANDROID || OGRE_PLATFORM == OGRE_PLATFORM_NACL
229 # if defined( OGRE_GCC_VISIBILITY )
230 # define _OgreExport __attribute__ ((visibility("default")))
231 # define _OgrePrivate __attribute__ ((visibility("hidden")))
234 # define _OgrePrivate
238 # define stricmp strcasecmp
241 # define OGRE_DEBUG_MODE 1
243 # define OGRE_DEBUG_MODE 0
246 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
247 #define OGRE_PLATFORM_LIB "OgrePlatform.bundle"
248 #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
249 #define OGRE_PLATFORM_LIB "OgrePlatform.a"
250 #else //OGRE_PLATFORM_LINUX
251 #define OGRE_PLATFORM_LIB "libOgrePlatform.so"
256 #define OGRE_UNICODE_SUPPORT 1
263 #ifdef OGRE_CONFIG_BIG_ENDIAN
264 # define OGRE_ENDIAN OGRE_ENDIAN_BIG
266 # define OGRE_ENDIAN OGRE_ENDIAN_LITTLE
277 #if OGRE_COMPILER == OGRE_COMPILER_MSVC
278 typedef unsigned __int64
uint64;
279 typedef __int64
int64;
unsigned long long uint64