oculus1

annotate libovr/Src/Kernel/OVR_Types.h @ 1:e2f9e4603129

added LibOVR and started a simple vr wrapper.
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Sep 2013 16:14:59 +0300
parents
children b069a5c27388
rev   line source
nuclear@1 1 /************************************************************************************
nuclear@1 2
nuclear@1 3 PublicHeader: OVR.h
nuclear@1 4 Filename : OVR_Types.h
nuclear@1 5 Content : Standard library defines and simple types
nuclear@1 6 Created : September 19, 2012
nuclear@1 7 Notes :
nuclear@1 8
nuclear@1 9 Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved.
nuclear@1 10
nuclear@1 11 Use of this software is subject to the terms of the Oculus license
nuclear@1 12 agreement provided at the time of installation or download, or which
nuclear@1 13 otherwise accompanies this software in either electronic or hard copy form.
nuclear@1 14
nuclear@1 15 ************************************************************************************/
nuclear@1 16
nuclear@1 17 #ifndef OVR_Types_H
nuclear@1 18 #define OVR_Types_H
nuclear@1 19
nuclear@1 20 //-----------------------------------------------------------------------------------
nuclear@1 21 // ****** Operating System
nuclear@1 22 //
nuclear@1 23 // Type definitions exist for the following operating systems: (OVR_OS_x)
nuclear@1 24 //
nuclear@1 25 // WIN32 - Win32 (Windows 95/98/ME and Windows NT/2000/XP)
nuclear@1 26 // DARWIN - Darwin OS (Mac OS X)
nuclear@1 27 // LINUX - Linux
nuclear@1 28 // ANDROID - Android
nuclear@1 29 // IPHONE - iPhone
nuclear@1 30
nuclear@1 31 #if (defined(__APPLE__) && (defined(__GNUC__) ||\
nuclear@1 32 defined(__xlC__) || defined(__xlc__))) || defined(__MACOS__)
nuclear@1 33 # if (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) || defined(__IPHONE_OS_VERSION_MIN_REQUIRED))
nuclear@1 34 # define OVR_OS_IPHONE
nuclear@1 35 # else
nuclear@1 36 # define OVR_OS_DARWIN
nuclear@1 37 # define OVR_OS_MAC
nuclear@1 38 # endif
nuclear@1 39 #elif (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
nuclear@1 40 # define OVR_OS_WIN32
nuclear@1 41 #elif (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
nuclear@1 42 # define OVR_OS_WIN32
nuclear@1 43 #elif defined(__linux__) || defined(__linux)
nuclear@1 44 # define OVR_OS_LINUX
nuclear@1 45 #else
nuclear@1 46 # define OVR_OS_OTHER
nuclear@1 47 #endif
nuclear@1 48
nuclear@1 49 #if defined(ANDROID)
nuclear@1 50 # define OVR_OS_ANDROID
nuclear@1 51 #endif
nuclear@1 52
nuclear@1 53
nuclear@1 54 //-----------------------------------------------------------------------------------
nuclear@1 55 // ***** CPU Architecture
nuclear@1 56 //
nuclear@1 57 // The following CPUs are defined: (OVR_CPU_x)
nuclear@1 58 //
nuclear@1 59 // X86 - x86 (IA-32)
nuclear@1 60 // X86_64 - x86_64 (amd64)
nuclear@1 61 // PPC - PowerPC
nuclear@1 62 // PPC64 - PowerPC64
nuclear@1 63 // MIPS - MIPS
nuclear@1 64 // OTHER - CPU for which no special support is present or needed
nuclear@1 65
nuclear@1 66
nuclear@1 67 #if defined(__x86_64__) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
nuclear@1 68 # define OVR_CPU_X86_64
nuclear@1 69 # define OVR_64BIT_POINTERS
nuclear@1 70 #elif defined(__i386__) || defined(OVR_OS_WIN32)
nuclear@1 71 # define OVR_CPU_X86
nuclear@1 72 #elif defined(__powerpc64__)
nuclear@1 73 # define OVR_CPU_PPC64
nuclear@1 74 #elif defined(__ppc__)
nuclear@1 75 # define OVR_CPU_PPC
nuclear@1 76 #elif defined(__mips__) || defined(__MIPSEL__)
nuclear@1 77 # define OVR_CPU_MIPS
nuclear@1 78 #elif defined(__arm__)
nuclear@1 79 # define OVR_CPU_ARM
nuclear@1 80 #else
nuclear@1 81 # define OVR_CPU_OTHER
nuclear@1 82 #endif
nuclear@1 83
nuclear@1 84 //-----------------------------------------------------------------------------------
nuclear@1 85 // ***** Co-Processor Architecture
nuclear@1 86 //
nuclear@1 87 // The following co-processors are defined: (OVR_CPU_x)
nuclear@1 88 //
nuclear@1 89 // SSE - Available on all modern x86 processors.
nuclear@1 90 // Altivec - Available on all modern ppc processors.
nuclear@1 91 // Neon - Available on some armv7+ processors.
nuclear@1 92
nuclear@1 93 #if defined(__SSE__) || defined(OVR_OS_WIN32)
nuclear@1 94 # define OVR_CPU_SSE
nuclear@1 95 #endif // __SSE__
nuclear@1 96
nuclear@1 97 #if defined( __ALTIVEC__ )
nuclear@1 98 # define OVR_CPU_ALTIVEC
nuclear@1 99 #endif // __ALTIVEC__
nuclear@1 100
nuclear@1 101 #if defined(__ARM_NEON__)
nuclear@1 102 # define OVR_CPU_ARM_NEON
nuclear@1 103 #endif // __ARM_NEON__
nuclear@1 104
nuclear@1 105
nuclear@1 106 //-----------------------------------------------------------------------------------
nuclear@1 107 // ***** Compiler
nuclear@1 108 //
nuclear@1 109 // The following compilers are defined: (OVR_CC_x)
nuclear@1 110 //
nuclear@1 111 // MSVC - Microsoft Visual C/C++
nuclear@1 112 // INTEL - Intel C++ for Linux / Windows
nuclear@1 113 // GNU - GNU C++
nuclear@1 114 // ARM - ARM C/C++
nuclear@1 115
nuclear@1 116 #if defined(__INTEL_COMPILER)
nuclear@1 117 // Intel 4.0 = 400
nuclear@1 118 // Intel 5.0 = 500
nuclear@1 119 // Intel 6.0 = 600
nuclear@1 120 // Intel 8.0 = 800
nuclear@1 121 // Intel 9.0 = 900
nuclear@1 122 # define OVR_CC_INTEL __INTEL_COMPILER
nuclear@1 123
nuclear@1 124 #elif defined(_MSC_VER)
nuclear@1 125 // MSVC 5.0 = 1100
nuclear@1 126 // MSVC 6.0 = 1200
nuclear@1 127 // MSVC 7.0 (VC2002) = 1300
nuclear@1 128 // MSVC 7.1 (VC2003) = 1310
nuclear@1 129 // MSVC 8.0 (VC2005) = 1400
nuclear@1 130 // MSVC 9.0 (VC2008) = 1500
nuclear@1 131 // MSVC 10.0 (VC2010) = 1600
nuclear@1 132 # define OVR_CC_MSVC _MSC_VER
nuclear@1 133
nuclear@1 134 #elif defined(__GNUC__)
nuclear@1 135 # define OVR_CC_GNU
nuclear@1 136
nuclear@1 137 #elif defined(__CC_ARM)
nuclear@1 138 # define OVR_CC_ARM
nuclear@1 139
nuclear@1 140 #else
nuclear@1 141 # error "Oculus does not support this Compiler"
nuclear@1 142 #endif
nuclear@1 143
nuclear@1 144
nuclear@1 145 //-----------------------------------------------------------------------------------
nuclear@1 146 // ***** Compiler Warnings
nuclear@1 147
nuclear@1 148 // Disable MSVC warnings
nuclear@1 149 #if defined(OVR_CC_MSVC)
nuclear@1 150 # pragma warning(disable : 4127) // Inconsistent dll linkage
nuclear@1 151 # pragma warning(disable : 4530) // Exception handling
nuclear@1 152 # if (OVR_CC_MSVC<1300)
nuclear@1 153 # pragma warning(disable : 4514) // Unreferenced inline function has been removed
nuclear@1 154 # pragma warning(disable : 4710) // Function not inlined
nuclear@1 155 # pragma warning(disable : 4714) // _force_inline not inlined
nuclear@1 156 # pragma warning(disable : 4786) // Debug variable name longer than 255 chars
nuclear@1 157 # endif // (OVR_CC_MSVC<1300)
nuclear@1 158 #endif // (OVR_CC_MSVC)
nuclear@1 159
nuclear@1 160
nuclear@1 161
nuclear@1 162 // *** Linux Unicode - must come before Standard Includes
nuclear@1 163
nuclear@1 164 #ifdef OVR_OS_LINUX
nuclear@1 165 // Use glibc unicode functions on linux.
nuclear@1 166 # ifndef _GNU_SOURCE
nuclear@1 167 # define _GNU_SOURCE
nuclear@1 168 # endif
nuclear@1 169 #endif
nuclear@1 170
nuclear@1 171 //-----------------------------------------------------------------------------------
nuclear@1 172 // ***** Standard Includes
nuclear@1 173 //
nuclear@1 174 #include <stddef.h>
nuclear@1 175 #include <limits.h>
nuclear@1 176 #include <float.h>
nuclear@1 177
nuclear@1 178
nuclear@1 179 // MSVC Based Memory Leak checking - for now
nuclear@1 180 #if defined(OVR_CC_MSVC) && defined(OVR_BUILD_DEBUG)
nuclear@1 181 # define _CRTDBG_MAP_ALLOC
nuclear@1 182 # include <stdlib.h>
nuclear@1 183 # include <crtdbg.h>
nuclear@1 184
nuclear@1 185 // Uncomment this to help debug memory leaks under Visual Studio in OVR apps only.
nuclear@1 186 // This shouldn't be defined in customer releases.
nuclear@1 187 # ifndef OVR_DEFINE_NEW
nuclear@1 188 # define OVR_DEFINE_NEW new(__FILE__, __LINE__)
nuclear@1 189 # define new OVR_DEFINE_NEW
nuclear@1 190 # endif
nuclear@1 191
nuclear@1 192 #endif
nuclear@1 193
nuclear@1 194
nuclear@1 195 //-----------------------------------------------------------------------------------
nuclear@1 196 // ***** Type definitions for Common Systems
nuclear@1 197
nuclear@1 198 namespace OVR {
nuclear@1 199
nuclear@1 200 typedef char Char;
nuclear@1 201
nuclear@1 202 // Pointer-sized integer
nuclear@1 203 typedef size_t UPInt;
nuclear@1 204 typedef ptrdiff_t SPInt;
nuclear@1 205
nuclear@1 206
nuclear@1 207 #if defined(OVR_OS_WIN32)
nuclear@1 208
nuclear@1 209 typedef char SByte; // 8 bit Integer (Byte)
nuclear@1 210 typedef unsigned char UByte;
nuclear@1 211 typedef short SInt16; // 16 bit Integer (Word)
nuclear@1 212 typedef unsigned short UInt16;
nuclear@1 213 typedef long SInt32; // 32 bit Integer
nuclear@1 214 typedef unsigned long UInt32;
nuclear@1 215 typedef __int64 SInt64; // 64 bit Integer (QWord)
nuclear@1 216 typedef unsigned __int64 UInt64;
nuclear@1 217
nuclear@1 218
nuclear@1 219 #elif defined(OVR_OS_MAC) || defined(OVR_OS_IPHONE) || defined(OVR_CC_GNU)
nuclear@1 220
nuclear@1 221 typedef int SByte __attribute__((__mode__ (__QI__)));
nuclear@1 222 typedef unsigned int UByte __attribute__((__mode__ (__QI__)));
nuclear@1 223 typedef int SInt16 __attribute__((__mode__ (__HI__)));
nuclear@1 224 typedef unsigned int UInt16 __attribute__((__mode__ (__HI__)));
nuclear@1 225 typedef int SInt32 __attribute__((__mode__ (__SI__)));
nuclear@1 226 typedef unsigned int UInt32 __attribute__((__mode__ (__SI__)));
nuclear@1 227 typedef int SInt64 __attribute__((__mode__ (__DI__)));
nuclear@1 228 typedef unsigned int UInt64 __attribute__((__mode__ (__DI__)));
nuclear@1 229
nuclear@1 230 #else
nuclear@1 231
nuclear@1 232 #include <sys/types.h>
nuclear@1 233 typedef int8_t SByte;
nuclear@1 234 typedef uint8_t UByte;
nuclear@1 235 typedef int16_t SInt16;
nuclear@1 236 typedef uint16_t UInt16;
nuclear@1 237 typedef int32_t SInt32;
nuclear@1 238 typedef uint32_t UInt32;
nuclear@1 239 typedef int64_t SInt64;
nuclear@1 240 typedef uint64_t UInt64;
nuclear@1 241
nuclear@1 242 #endif
nuclear@1 243
nuclear@1 244
nuclear@1 245 // ***** BaseTypes Namespace
nuclear@1 246
nuclear@1 247 // BaseTypes namespace is explicitly declared to allow base types to be used
nuclear@1 248 // by customers directly without other contents of OVR namespace.
nuclear@1 249 //
nuclear@1 250 // Its is expected that GFx samples will declare 'using namespace OVR::BaseTypes'
nuclear@1 251 // to allow using these directly without polluting the target scope with other
nuclear@1 252 // OVR declarations, such as Ptr<>, String or Mutex.
nuclear@1 253 namespace BaseTypes
nuclear@1 254 {
nuclear@1 255 using OVR::UPInt;
nuclear@1 256 using OVR::SPInt;
nuclear@1 257 using OVR::UByte;
nuclear@1 258 using OVR::SByte;
nuclear@1 259 using OVR::UInt16;
nuclear@1 260 using OVR::SInt16;
nuclear@1 261 using OVR::UInt32;
nuclear@1 262 using OVR::SInt32;
nuclear@1 263 using OVR::UInt64;
nuclear@1 264 using OVR::SInt64;
nuclear@1 265 } // OVR::BaseTypes
nuclear@1 266
nuclear@1 267 } // OVR
nuclear@1 268
nuclear@1 269
nuclear@1 270 //-----------------------------------------------------------------------------------
nuclear@1 271 // ***** Macro Definitions
nuclear@1 272 //
nuclear@1 273 // We define the following:
nuclear@1 274 //
nuclear@1 275 // OVR_BYTE_ORDER - Defined to either OVR_LITTLE_ENDIAN or OVR_BIG_ENDIAN
nuclear@1 276 // OVR_FORCE_INLINE - Forces inline expansion of function
nuclear@1 277 // OVR_ASM - Assembly language prefix
nuclear@1 278 // OVR_STR - Prefixes string with L"" if building unicode
nuclear@1 279 //
nuclear@1 280 // OVR_STDCALL - Use stdcall calling convention (Pascal arg order)
nuclear@1 281 // OVR_CDECL - Use cdecl calling convention (C argument order)
nuclear@1 282 // OVR_FASTCALL - Use fastcall calling convention (registers)
nuclear@1 283 //
nuclear@1 284
nuclear@1 285 // Byte order constants, OVR_BYTE_ORDER is defined to be one of these.
nuclear@1 286 #define OVR_LITTLE_ENDIAN 1
nuclear@1 287 #define OVR_BIG_ENDIAN 2
nuclear@1 288
nuclear@1 289
nuclear@1 290 // Force inline substitute - goes before function declaration
nuclear@1 291 #if defined(OVR_CC_MSVC)
nuclear@1 292 # define OVR_FORCE_INLINE __forceinline
nuclear@1 293 #elif defined(OVR_CC_GNU)
nuclear@1 294 # define OVR_FORCE_INLINE __attribute__((always_inline)) inline
nuclear@1 295 #else
nuclear@1 296 # define OVR_FORCE_INLINE inline
nuclear@1 297 #endif // OVR_CC_MSVC
nuclear@1 298
nuclear@1 299
nuclear@1 300 #if defined(OVR_OS_WIN32)
nuclear@1 301
nuclear@1 302 // ***** Win32
nuclear@1 303
nuclear@1 304 // Byte order
nuclear@1 305 #define OVR_BYTE_ORDER OVR_LITTLE_ENDIAN
nuclear@1 306
nuclear@1 307 // Calling convention - goes after function return type but before function name
nuclear@1 308 #ifdef __cplusplus_cli
nuclear@1 309 # define OVR_FASTCALL __stdcall
nuclear@1 310 #else
nuclear@1 311 # define OVR_FASTCALL __fastcall
nuclear@1 312 #endif
nuclear@1 313
nuclear@1 314 #define OVR_STDCALL __stdcall
nuclear@1 315 #define OVR_CDECL __cdecl
nuclear@1 316
nuclear@1 317
nuclear@1 318 // Assembly macros
nuclear@1 319 #if defined(OVR_CC_MSVC)
nuclear@1 320 # define OVR_ASM _asm
nuclear@1 321 #else
nuclear@1 322 # define OVR_ASM asm
nuclear@1 323 #endif // (OVR_CC_MSVC)
nuclear@1 324
nuclear@1 325 #ifdef UNICODE
nuclear@1 326 # define OVR_STR(str) L##str
nuclear@1 327 #else
nuclear@1 328 # define OVR_STR(str) str
nuclear@1 329 #endif // UNICODE
nuclear@1 330
nuclear@1 331 #else
nuclear@1 332
nuclear@1 333 // **** Standard systems
nuclear@1 334
nuclear@1 335 #if (defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN))|| \
nuclear@1 336 (defined(_BYTE_ORDER) && (_BYTE_ORDER == _BIG_ENDIAN))
nuclear@1 337 # define OVR_BYTE_ORDER OVR_BIG_ENDIAN
nuclear@1 338 #elif (defined(__ARMEB__) || defined(OVR_CPU_PPC) || defined(OVR_CPU_PPC64))
nuclear@1 339 # define OVR_BYTE_ORDER OVR_BIG_ENDIAN
nuclear@1 340 #else
nuclear@1 341 # define OVR_BYTE_ORDER OVR_LITTLE_ENDIAN
nuclear@1 342 #endif
nuclear@1 343
nuclear@1 344 // Assembly macros
nuclear@1 345 #define OVR_ASM __asm__
nuclear@1 346 #define OVR_ASM_PROC(procname) OVR_ASM
nuclear@1 347 #define OVR_ASM_END OVR_ASM
nuclear@1 348
nuclear@1 349 // Calling convention - goes after function return type but before function name
nuclear@1 350 #define OVR_FASTCALL
nuclear@1 351 #define OVR_STDCALL
nuclear@1 352 #define OVR_CDECL
nuclear@1 353
nuclear@1 354 #endif // defined(OVR_OS_WIN32)
nuclear@1 355
nuclear@1 356
nuclear@1 357
nuclear@1 358 //-----------------------------------------------------------------------------------
nuclear@1 359 // ***** OVR_DEBUG_BREAK, OVR_ASSERT
nuclear@1 360 //
nuclear@1 361 // If not in debug build, macros do nothing
nuclear@1 362 #ifndef OVR_BUILD_DEBUG
nuclear@1 363
nuclear@1 364 # define OVR_DEBUG_BREAK ((void)0)
nuclear@1 365 # define OVR_ASSERT(p) ((void)0)
nuclear@1 366
nuclear@1 367 #else
nuclear@1 368
nuclear@1 369 // Microsoft Win32 specific debugging support
nuclear@1 370 #if defined(OVR_OS_WIN32)
nuclear@1 371 # ifdef OVR_CPU_X86
nuclear@1 372 # if defined(__cplusplus_cli)
nuclear@1 373 # define OVR_DEBUG_BREAK do { __debugbreak(); } while(0)
nuclear@1 374 # elif defined(OVR_CC_GNU)
nuclear@1 375 # define OVR_DEBUG_BREAK do { OVR_ASM("int $3\n\t"); } while(0)
nuclear@1 376 # else
nuclear@1 377 # define OVR_DEBUG_BREAK do { OVR_ASM int 3 } while (0)
nuclear@1 378 # endif
nuclear@1 379 # else
nuclear@1 380 # define OVR_DEBUG_BREAK do { __debugbreak(); } while(0)
nuclear@1 381 # endif
nuclear@1 382 // Unix specific debugging support
nuclear@1 383 #elif defined(OVR_CPU_X86) || defined(OVR_CPU_X86_64)
nuclear@1 384 # define OVR_DEBUG_BREAK do { OVR_ASM("int $3\n\t"); } while(0)
nuclear@1 385 #else
nuclear@1 386 # define OVR_DEBUG_BREAK do { *((int *) 0) = 1; } while(0)
nuclear@1 387 #endif
nuclear@1 388
nuclear@1 389 // This will cause compiler breakpoint
nuclear@1 390 #define OVR_ASSERT(p) do { if (!(p)) { OVR_DEBUG_BREAK; } } while(0)
nuclear@1 391
nuclear@1 392 #endif // OVR_BUILD_DEBUG
nuclear@1 393
nuclear@1 394
nuclear@1 395 // Compile-time assert; produces compiler error if condition is false
nuclear@1 396 #define OVR_COMPILER_ASSERT(x) { int zero = 0; switch(zero) {case 0: case x:;} }
nuclear@1 397
nuclear@1 398
nuclear@1 399
nuclear@1 400 //-----------------------------------------------------------------------------------
nuclear@1 401 // ***** OVR_UNUSED - Unused Argument handling
nuclear@1 402
nuclear@1 403 // Macro to quiet compiler warnings about unused parameters/variables.
nuclear@1 404 #if defined(OVR_CC_GNU)
nuclear@1 405 # define OVR_UNUSED(a) do {__typeof__ (&a) __attribute__ ((unused)) __tmp = &a; } while(0)
nuclear@1 406 #else
nuclear@1 407 # define OVR_UNUSED(a) (a)
nuclear@1 408 #endif
nuclear@1 409
nuclear@1 410 #define OVR_UNUSED1(a1) OVR_UNUSED(a1)
nuclear@1 411 #define OVR_UNUSED2(a1,a2) OVR_UNUSED(a1); OVR_UNUSED(a2)
nuclear@1 412 #define OVR_UNUSED3(a1,a2,a3) OVR_UNUSED2(a1,a2); OVR_UNUSED(a3)
nuclear@1 413 #define OVR_UNUSED4(a1,a2,a3,a4) OVR_UNUSED3(a1,a2,a3); OVR_UNUSED(a4)
nuclear@1 414 #define OVR_UNUSED5(a1,a2,a3,a4,a5) OVR_UNUSED4(a1,a2,a3,a4); OVR_UNUSED(a5)
nuclear@1 415 #define OVR_UNUSED6(a1,a2,a3,a4,a5,a6) OVR_UNUSED4(a1,a2,a3,a4); OVR_UNUSED2(a5,a6)
nuclear@1 416 #define OVR_UNUSED7(a1,a2,a3,a4,a5,a6,a7) OVR_UNUSED4(a1,a2,a3,a4); OVR_UNUSED3(a5,a6,a7)
nuclear@1 417 #define OVR_UNUSED8(a1,a2,a3,a4,a5,a6,a7,a8) OVR_UNUSED4(a1,a2,a3,a4); OVR_UNUSED4(a5,a6,a7,a8)
nuclear@1 418 #define OVR_UNUSED9(a1,a2,a3,a4,a5,a6,a7,a8,a9) OVR_UNUSED4(a1,a2,a3,a4); OVR_UNUSED5(a5,a6,a7,a8,a9)
nuclear@1 419
nuclear@1 420
nuclear@1 421 //-----------------------------------------------------------------------------------
nuclear@1 422 // ***** Configuration Macros
nuclear@1 423
nuclear@1 424 // SF Build type
nuclear@1 425 #ifdef OVR_BUILD_DEBUG
nuclear@1 426 # define OVR_BUILD_STRING "Debug"
nuclear@1 427 #else
nuclear@1 428 # define OVR_BUILD_STRING "Release"
nuclear@1 429 #endif
nuclear@1 430
nuclear@1 431
nuclear@1 432 //// Enables SF Debugging information
nuclear@1 433 //# define OVR_BUILD_DEBUG
nuclear@1 434
nuclear@1 435 // OVR_DEBUG_STATEMENT injects a statement only in debug builds.
nuclear@1 436 // OVR_DEBUG_SELECT injects first argument in debug builds, second argument otherwise.
nuclear@1 437 #ifdef OVR_BUILD_DEBUG
nuclear@1 438 #define OVR_DEBUG_STATEMENT(s) s
nuclear@1 439 #define OVR_DEBUG_SELECT(d, nd) d
nuclear@1 440 #else
nuclear@1 441 #define OVR_DEBUG_STATEMENT(s)
nuclear@1 442 #define OVR_DEBUG_SELECT(d, nd) nd
nuclear@1 443 #endif
nuclear@1 444
nuclear@1 445
nuclear@1 446 #define OVR_ENABLE_THREADS
nuclear@1 447 //
nuclear@1 448 // Prevents OVR from defining new within
nuclear@1 449 // type macros, so developers can override
nuclear@1 450 // new using the #define new new(...) trick
nuclear@1 451 // - used with OVR_DEFINE_NEW macro
nuclear@1 452 //# define OVR_BUILD_DEFINE_NEW
nuclear@1 453 //
nuclear@1 454
nuclear@1 455
nuclear@1 456 #endif // OVR_Types_h