headers.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. /******************************************************************************/
  2. #define PHYSX_DLL 0 // if dynamically link PhysX
  3. #if EE_PRIVATE
  4. // Threads
  5. #if WEB
  6. #define HAS_THREADS 0 // WEB has no real threads
  7. #else
  8. #define HAS_THREADS 1
  9. #endif
  10. /******************************************************************************/
  11. // SELECT WHICH LIBRARIES TO USE
  12. /******************************************************************************/
  13. // Renderer - Define "DX9" for DirectX 9, "DX11" for DirectX 10/11, "DX12" for DirectX 12, "METAL" for Metal, "VULKAN" for Vulkan, "GL" or nothing for OpenGL
  14. // defines are specified through Project Settings
  15. #ifdef DX9
  16. #undef DX9
  17. #define DX9 1
  18. #else
  19. #define DX9 0
  20. #endif
  21. #ifdef DX11
  22. #undef DX11
  23. #define DX11 1
  24. #else
  25. #define DX11 0
  26. #endif
  27. #ifdef DX12
  28. #undef DX12
  29. #define DX12 1
  30. #else
  31. #define DX12 0
  32. #endif
  33. #ifdef METAL
  34. #undef METAL
  35. #define METAL 1
  36. #else
  37. #define METAL 0
  38. #endif
  39. #ifdef VULKAN
  40. #undef VULKAN
  41. #define VULKAN 1
  42. #else
  43. #define VULKAN 0
  44. #endif
  45. #if defined GL || !(DX9 || DX11 || DX12 || METAL || VULKAN)
  46. #undef GL
  47. #define GL 1
  48. #else
  49. #define GL 0
  50. #endif
  51. #if (DX9+DX11+DX12+METAL+VULKAN+GL)!=1
  52. #error Unsupported platform detected
  53. #endif
  54. #define GL_ES (GL && (IOS || ANDROID || WEB))
  55. #define GL_LOCK (GL && 0) // if surround all GL calls with a lock
  56. #define SLOW_SHADER_LOAD GL // Only OpenGL has slow shader loads because it compiles on the fly from text instead of binary
  57. #if DX9
  58. #define GPU_API(dx9, dx11, gl) dx9
  59. #elif DX11
  60. #define GPU_API(dx9, dx11, gl) dx11
  61. #elif GL
  62. #define GPU_API(dx9, dx11, gl) gl
  63. #endif
  64. #if GL_ES
  65. #define GPU_HALF_SUPPORTED 0 // depends on "GL_OES_vertex_half_float" GLES extension
  66. #else
  67. #define GPU_HALF_SUPPORTED 1
  68. #endif
  69. #define REVERSE_DEPTH (!GL) // if Depth Buffer is reversed
  70. #define PHYSX_DLL_ACTUAL (PHYSX && PHYSX_DLL && (WINDOWS_OLD || LINUX))
  71. #if PHYSX
  72. #define PHYS_API(physx, bullet) physx
  73. #else
  74. #define PHYS_API(physx, bullet) bullet
  75. #endif
  76. #if PHYSX && (WINDOWS || LINUX)
  77. #define PX_FOUNDATION_DLL 0
  78. #define PX_PHYSX_STATIC_LIB
  79. #endif
  80. // Sound
  81. #define DIRECT_SOUND WINDOWS_OLD // use DirectSound on Windows Classic
  82. #define XAUDIO WINDOWS_NEW // use XAudio on Windows Universal
  83. #define OPEN_AL (APPLE || LINUX || WEB) // use OpenAL on Apple, Linux and Web. OpenAL on Windows requires OpenAL DLL file, however it can be enabled just for testing the implementation.
  84. #define OPEN_SL ANDROID // use OpenSL on Android
  85. /******************************************************************************/
  86. // INCLUDE SYSTEM HEADERS
  87. /******************************************************************************/
  88. // this needs to be included first, as some macros may cause conflicts with the headers
  89. #include "../../../ThirdPartyLibs/begin.h"
  90. #if WINDOWS // Windows
  91. #define SUPPORT_WINDOWS_XP (!X64 && DX9) // 0=minor performance improvements in some parts of the engine, but no WindowsXP support, 1=some extra checks in the codes but with WindowsXP support
  92. #if WINDOWS_OLD
  93. #if SUPPORT_WINDOWS_XP // https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745.aspx (this can be used for compilation testing if we don't use any functions not available on WindowsXP, however we can use defines and enums)
  94. #define _WIN32_WINNT 0x0502 // _WIN32_WINNT_WS03 , don't use any API's newer than WindowsXP SP2
  95. #else
  96. #define _WIN32_WINNT 0x0600 // _WIN32_WINNT_VISTA, don't use any API's newer than Windows Vista
  97. #endif
  98. #endif
  99. #define NOGDICAPMASKS
  100. #define NOICONS
  101. #define NOKEYSTATES
  102. #define OEMRESOURCE
  103. #define NOATOM
  104. #define NOCOLOR
  105. #define NODRAWTEXT
  106. #define NOKERNEL
  107. #define NOMEMMGR
  108. #define NOMETAFILE
  109. #define NOMINMAX
  110. #define NOOPENFILE
  111. #define NOSCROLL
  112. #define NOSERVICE
  113. #define NOSOUND
  114. #define NOCOMM
  115. #define NOKANJI
  116. #define NOHELP
  117. #define NOPROFILER
  118. #define NODEFERWINDOWPOS
  119. #define NOMCX
  120. #define _ISO646
  121. #define TokenType WindowsTokenType
  122. #define UpdateWindow WindowsUpdateWindow
  123. #define TimeStamp WindowsTimeStamp
  124. #define LOCK_WRITE WindowsLOCK_WRITE
  125. #define _ALLOW_RTCc_IN_STL
  126. #pragma warning(disable:4091) // 'typedef ': ignored on left of '' when no variable is declared
  127. #include <stdio.h>
  128. #include <new.h>
  129. #include <typeinfo>
  130. #include <type_traits>
  131. #include <atomic>
  132. #include <process.h>
  133. #include <winsock2.h>
  134. #include <ws2tcpip.h>
  135. #include <windows.h>
  136. #include <io.h>
  137. #include <share.h>
  138. #include <fcntl.h>
  139. #include <sys/stat.h>
  140. #include <intrin.h>
  141. #include <locale.h>
  142. #if WINDOWS_OLD
  143. #include <IPHlpApi.h> // including this fails on WINDOWS_NEW
  144. #include <shlobj.h>
  145. #include <psapi.h>
  146. #include <wbemidl.h>
  147. #include <tlhelp32.h>
  148. #define SECURITY_WIN32
  149. #include <Security.h>
  150. #include <comdef.h>
  151. #else
  152. #include <collection.h>
  153. #include <ppltasks.h>
  154. #include <mmdeviceapi.h>
  155. #include <audioclient.h>
  156. #include <wrl/implements.h>
  157. #endif
  158. #if OPEN_AL
  159. #include "../../../ThirdPartyLibs/OpenAL for Windows/al.h"
  160. #include "../../../ThirdPartyLibs/OpenAL for Windows/alc.h"
  161. #endif
  162. #include "../../../ThirdPartyLibs/DirectX/xinput.h"
  163. #if WINDOWS_OLD
  164. #define DIRECTINPUT_VERSION 0x0800
  165. #include "../../../ThirdPartyLibs/DirectX/dinput.h"
  166. #endif
  167. #if DIRECT_SOUND
  168. #include "../../../ThirdPartyLibs/DirectX/dsound.h"
  169. #elif XAUDIO
  170. #if WINDOWS_OLD
  171. #include "../../../ThirdPartyLibs/DirectX/old/xaudio2.h"
  172. #include "../../../ThirdPartyLibs/DirectX/old/x3daudio.h"
  173. #else
  174. #include "../../../ThirdPartyLibs/DirectX/xaudio2.h"
  175. #include "../../../ThirdPartyLibs/DirectX/x3daudio.h"
  176. #endif
  177. #endif
  178. #elif APPLE // Apple
  179. #define Ptr ApplePtr
  180. #define Point ApplePoint
  181. #define Cell AppleCell
  182. #define Rect AppleRect
  183. #define Button AppleButton
  184. #define Cursor AppleCursor
  185. #define FileInfo AppleFileInfo
  186. #define TextStyle AppleTextStyle
  187. #define gamma AppleGamma
  188. #define ok AppleOk
  189. #define require AppleRequire
  190. #define __STDBOOL_H // to ignore stdbool.h header which defines _Bool which is used by PhysX otherwise
  191. #elif LINUX || WEB
  192. #define Time LinuxTime
  193. #define Font LinuxFont
  194. #define Region LinuxRegion
  195. #define Window XWindow
  196. #define Cursor XCursor
  197. #elif ANDROID // Android
  198. #include <stdio.h>
  199. #include <new>
  200. #include <typeinfo>
  201. #include <type_traits>
  202. #include <atomic>
  203. #include <fcntl.h>
  204. #include <stdlib.h>
  205. #include <unistd.h>
  206. #include <pthread.h>
  207. #include <signal.h>
  208. #include <locale.h>
  209. #include <errno.h>
  210. #include <wctype.h>
  211. #include <dirent.h>
  212. #include <sys/types.h>
  213. #include <sys/stat.h>
  214. #include <sys/time.h>
  215. #include <sys/mount.h>
  216. #include <sys/ioctl.h>
  217. #include <sys/socket.h>
  218. #include <sys/wait.h>
  219. #include <netdb.h>
  220. #include <netinet/in.h>
  221. #include <netinet/tcp.h>
  222. #include <linux/if.h>
  223. #include <arpa/inet.h>
  224. #include <android/log.h>
  225. #include <android/sensor.h>
  226. #include <android/asset_manager.h>
  227. #include <android/api-level.h> // needed for __ANDROID_API__
  228. #include <android_native_app_glue.h>
  229. #include <SLES/OpenSLES.h>
  230. #include <SLES/OpenSLES_Android.h>
  231. #if __ANDROID_API__>=21
  232. #include <sys/statvfs.h>
  233. #endif
  234. #undef LOCK_READ
  235. #undef LOCK_WRITE
  236. #endif
  237. // Renderer
  238. #define MAX_FVF_DECL_SIZE (MAXD3DDECLLENGTH+1) // +1 for END
  239. #if DX9|DX11 // DirectX 9, 11
  240. #include "../../../ThirdPartyLibs/DirectX/dxgi1_6.h"
  241. #include "../../../ThirdPartyLibs/DirectX/d3d9.h"
  242. #include "../../../ThirdPartyLibs/DirectX/d3d11_4.h"
  243. #if DX11
  244. #include "../../../ThirdPartyLibs/DirectX/d3dcompiler.h"
  245. #include "../../../ThirdPartyLibs/DirectX/d3dcommon.h"
  246. #endif
  247. #elif GL // OpenGL
  248. #if WINDOWS
  249. #define GLEW_STATIC
  250. #include "../../../ThirdPartyLibs/GL/glew.h"
  251. #include "../../../ThirdPartyLibs/GL/wglew.h"
  252. // if we're compiling OpenGL on windows, then include DirectX headers as well, to support some basic DirectX functions
  253. #include "../../../ThirdPartyLibs/DirectX/d3d9.h"
  254. #include "../../../ThirdPartyLibs/DirectX/d3d11_3.h"
  255. #elif MAC
  256. #include <OpenGL/gl3.h>
  257. #include <OpenGL/gl3ext.h>
  258. #elif LINUX
  259. #define GL_GLEXT_PROTOTYPES
  260. #define GLX_GLXEXT_PROTOTYPES
  261. #include <GL/gl.h>
  262. #include <GL/glext.h>
  263. #include <GL/glx.h>
  264. #elif ANDROID // Android OpenGL ES
  265. #include <EGL/egl.h>
  266. #if __ANDROID_API__>=18 // GL ES 3.0 headers available only on API 18 and newer
  267. #include <GLES3/gl3.h>
  268. #include <GLES3/gl3ext.h>
  269. #else
  270. #include <GLES2/gl2.h>
  271. #include <GLES2/gl2ext.h>
  272. #endif
  273. #elif IOS // iOS OpenGL ES
  274. #include <UIKit/UIKit.h>
  275. #include <QuartzCore/QuartzCore.h>
  276. #include <OpenGLES/EAGL.h>
  277. #include <OpenGLES/EAGLDrawable.h>
  278. #include <OpenGLES/ES3/gl.h>
  279. #include <OpenGLES/ES3/glext.h>
  280. #elif WEB // WebGL
  281. #define GL_GLEXT_PROTOTYPES
  282. #include <EGL/egl.h>
  283. #include <GLES3/gl3.h>
  284. #endif
  285. #endif
  286. #if WINDOWS
  287. #undef GetComputerName
  288. #undef THIS
  289. #undef IGNORE
  290. #undef TRANSPARENT
  291. #undef ERROR
  292. #undef UNIQUE_NAME
  293. #undef INPUT_MOUSE
  294. #undef INPUT_KEYBOARD
  295. #undef near
  296. #undef min
  297. #undef max
  298. #undef TokenType
  299. #undef UpdateWindow
  300. #undef TimeStamp
  301. #undef LOCK_WRITE
  302. #undef RGB
  303. #undef ReplaceText
  304. #undef FindText
  305. #endif
  306. #if APPLE // Mac, iOS
  307. #include <stdio.h>
  308. #include <new>
  309. #include <typeinfo>
  310. #include <type_traits>
  311. #include <atomic>
  312. #include <fcntl.h>
  313. #include <stdlib.h>
  314. #include <unistd.h>
  315. #include <pthread.h>
  316. #include <signal.h>
  317. #include <errno.h>
  318. #include <wctype.h>
  319. #include <dirent.h>
  320. #include <locale.h>
  321. #include <sys/types.h>
  322. #include <sys/stat.h>
  323. #include <sys/statvfs.h>
  324. #include <sys/time.h>
  325. #include <sys/mount.h>
  326. #include <sys/ioctl.h>
  327. #include <sys/sysctl.h>
  328. #include <sys/socket.h>
  329. #include <netdb.h>
  330. #include <netinet/in.h>
  331. #include <netinet/tcp.h>
  332. #include <ifaddrs.h>
  333. #include <net/if.h>
  334. #include <net/if_dl.h>
  335. #include <arpa/inet.h>
  336. #include <mach/mach.h>
  337. #include <mach/clock.h>
  338. #include <mach/mach_time.h>
  339. #include <libkern/OSAtomic.h>
  340. #include <OpenAL/al.h>
  341. #include <OpenAL/alc.h>
  342. #include <CoreFoundation/CoreFoundation.h>
  343. #include <StoreKit/StoreKit.h>
  344. #include <AudioToolbox/AudioToolbox.h>
  345. #if MAC
  346. #include <smmintrin.h>
  347. #include <wmmintrin.h>
  348. #include <CoreAudio/CoreAudio.h>
  349. #include <net/if_types.h>
  350. #include <IOKit/hid/IOHIDLib.h>
  351. #include <IOKit/pwr_mgt/IOPMLib.h>
  352. #include <Carbon/Carbon.h>
  353. #include <OpenGL/OpenGL.h>
  354. #ifdef __OBJC__
  355. #include <Cocoa/Cocoa.h>
  356. #endif
  357. #elif IOS
  358. #define IFT_ETHER 0x06 // iOS does not have this in headers
  359. #include <CoreMotion/CoreMotion.h>
  360. #include <CoreLocation/CoreLocation.h>
  361. #include <AVFoundation/AVFoundation.h>
  362. #include <AdSupport/ASIdentifierManager.h>
  363. #include <FBSDKCoreKit/FBSDKCoreKit.h>
  364. #include <FBSDKLoginKit/FBSDKLoginKit.h>
  365. #include <FBSDKShareKit/FBSDKShareKit.h>
  366. #include "../../../ThirdPartyLibs/Chartboost/Headers/Chartboost.h"
  367. #endif
  368. #undef Ptr
  369. #undef Point
  370. #undef Cell
  371. #undef Rect
  372. #undef Button
  373. #undef Cursor
  374. #undef FileInfo
  375. #undef TextStyle
  376. #undef gamma
  377. #undef ok
  378. #undef require
  379. #undef verify
  380. #undef check
  381. #undef MIN
  382. #undef MAX
  383. #undef ABS
  384. #endif
  385. #if LINUX // Linux
  386. #include <stdio.h>
  387. #include <new>
  388. #include <malloc.h>
  389. #include <typeinfo>
  390. #include <type_traits>
  391. #include <atomic>
  392. #include <fcntl.h>
  393. #include <stdlib.h>
  394. #include <unistd.h>
  395. #include <pthread.h>
  396. #include <signal.h>
  397. #include <errno.h>
  398. #include <wctype.h>
  399. #include <dirent.h>
  400. #include <locale.h>
  401. #include <cpuid.h>
  402. #include <pwd.h>
  403. #include <smmintrin.h>
  404. #include <wmmintrin.h>
  405. #include <sys/types.h>
  406. #include <sys/stat.h>
  407. #include <sys/statvfs.h>
  408. #include <sys/time.h>
  409. #include <sys/mount.h>
  410. #include <sys/ioctl.h>
  411. #include <sys/socket.h>
  412. #include <sys/wait.h>
  413. #include <sys/resource.h>
  414. #include <netdb.h>
  415. #include <netinet/in.h>
  416. #include <netinet/tcp.h>
  417. #include <ifaddrs.h>
  418. #include <linux/if.h>
  419. #include <arpa/inet.h>
  420. #include <string.h>
  421. #include <X11/Xatom.h>
  422. #include <X11/XKBlib.h>
  423. #include <X11/Xmu/WinUtil.h>
  424. #include <X11/Xcursor/Xcursor.h>
  425. #include <X11/extensions/xf86vmode.h>
  426. #include <X11/extensions/XInput2.h>
  427. #include <Xm/MwmUtil.h>
  428. #if OPEN_AL
  429. #include "AL/al.h"
  430. #include "AL/alc.h"
  431. #endif
  432. #undef LOCK_READ
  433. #undef LOCK_WRITE
  434. #undef PropertyNotify
  435. #undef Status
  436. #undef Convex
  437. #undef Button1
  438. #undef Button2
  439. #undef Button3
  440. #undef Button4
  441. #undef Button5
  442. #undef Bool
  443. #undef Time
  444. #undef Region
  445. #undef Window
  446. #undef Cursor
  447. #undef Font
  448. #undef None
  449. #undef Success
  450. #undef B32
  451. #undef B16
  452. #endif
  453. #if WEB // Web
  454. #include <emscripten.h>
  455. #include <emscripten/html5.h>
  456. #include <stdio.h>
  457. #include <new>
  458. #include <typeinfo>
  459. #include <type_traits>
  460. #include <atomic>
  461. #include <fcntl.h>
  462. #include <stdlib.h>
  463. #include <unistd.h>
  464. #include <pthread.h>
  465. #include <signal.h>
  466. #include <errno.h>
  467. #include <wctype.h>
  468. #include <dirent.h>
  469. #include <locale.h>
  470. #include <sys/types.h>
  471. #include <sys/stat.h>
  472. #include <sys/statvfs.h>
  473. #include <sys/time.h>
  474. #include <sys/mount.h>
  475. #include <sys/ioctl.h>
  476. #include <sys/socket.h>
  477. #include <sys/wait.h>
  478. #include <netdb.h>
  479. #include <netinet/in.h>
  480. #include <netinet/tcp.h>
  481. #include <arpa/inet.h>
  482. #include <string.h>
  483. #include <X11/Xatom.h>
  484. #include <X11/Xlib.h>
  485. #include <X11/Xutil.h>
  486. #if OPEN_AL
  487. #include "AL/al.h"
  488. #include "AL/alc.h"
  489. #endif
  490. #undef LOCK_READ
  491. #undef LOCK_WRITE
  492. #undef PropertyNotify
  493. #undef Status
  494. #undef Convex
  495. #undef Button1
  496. #undef Button2
  497. #undef Button3
  498. #undef Button4
  499. #undef Button5
  500. #undef Bool
  501. #undef Time
  502. #undef Region
  503. #undef Window
  504. #undef Cursor
  505. #undef Font
  506. #undef None
  507. #undef Success
  508. #endif
  509. /******************************************************************************/
  510. // INCLUDE THIRD PARTY LIBRARIES
  511. /******************************************************************************/
  512. // Physics
  513. #if PHYSX // use PhysX
  514. #ifndef NDEBUG
  515. #define NDEBUG
  516. #endif
  517. #if ARM
  518. #include <arm_neon.h> // TODO: remove this once fixed in PhysX, include ARM NEON before PhysX headers, as workaround for https://github.com/NVIDIAGameWorks/PhysX-3.4/issues/77
  519. #endif
  520. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxAggregate.h"
  521. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxBatchQuery.h"
  522. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxMaterial.h"
  523. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxPhysics.h"
  524. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxPhysicsVersion.h"
  525. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxRigidDynamic.h"
  526. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxRigidStatic.h"
  527. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxScene.h"
  528. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxShape.h"
  529. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/PxSimulationEventCallback.h"
  530. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxBoxGeometry.h"
  531. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxSphereGeometry.h"
  532. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxCapsuleGeometry.h"
  533. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxPlaneGeometry.h"
  534. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxConvexMeshGeometry.h"
  535. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxTriangleMeshGeometry.h"
  536. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxHeightFieldGeometry.h"
  537. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxConvexMesh.h"
  538. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxTriangleMesh.h"
  539. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxHeightField.h"
  540. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/geometry/PxGeometryQuery.h"
  541. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/cloth/PxCloth.h"
  542. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/cloth/PxClothFabric.h"
  543. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/cloth/PxClothParticleData.h"
  544. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/common/PxTolerancesScale.h"
  545. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/cooking/PxCooking.h"
  546. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxClothFabricCooker.h"
  547. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxDefaultAllocator.h"
  548. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxDefaultErrorCallback.h"
  549. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxDefaultCpuDispatcher.h"
  550. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxDefaultSimulationFilterShader.h"
  551. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxD6Joint.h"
  552. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxDistanceJoint.h"
  553. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxFixedJoint.h"
  554. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxJoint.h"
  555. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxPrismaticJoint.h"
  556. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxRigidBodyExt.h"
  557. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxRevoluteJoint.h"
  558. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/extensions/PxSphericalJoint.h"
  559. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/vehicle/PxVehicleDrive4W.h"
  560. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/vehicle/PxVehicleWheels.h"
  561. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/vehicle/PxVehicleUpdate.h"
  562. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/vehicle/PxVehicleTireFriction.h"
  563. #include "../../../ThirdPartyLibs/PhysX/PhysX/Include/vehicle/PxVehicleUtilControl.h"
  564. #include "../../../ThirdPartyLibs/PhysX/PhysX/Source/GeomUtils/src/mesh/GuMeshData.h" // needed for PX_MESH_VERSION
  565. #include "../../../ThirdPartyLibs/PhysX/PhysX/Source/GeomUtils/src/convex/GuConvexMesh.h" // needed for PX_CONVEX_VERSION
  566. #include "../../../ThirdPartyLibs/PhysX/PxShared/include/foundation/PxFoundation.h"
  567. #include "../../../ThirdPartyLibs/PhysX/PxShared/include/foundation/PxFoundationVersion.h"
  568. #include "../../../ThirdPartyLibs/PhysX/PxShared/include/foundation/PxIO.h"
  569. #include "../../../ThirdPartyLibs/PhysX/PxShared/include/task/PxTask.h"
  570. using namespace physx;
  571. #endif
  572. // always include Bullet to generate optimized PhysBody if needed
  573. #pragma warning(push )
  574. #pragma warning(disable:4359 ) // Alignment specifier is less than actual alignment (128), and will be ignored.
  575. #pragma warning(disable:4311 4302) // 'type cast': pointer truncation from '' to ''
  576. #include "../../../ThirdPartyLibs/Bullet/lib/src/btBulletDynamicsCommon.h"
  577. #pragma warning(pop)
  578. // Recast/Detour path finding
  579. #include "../../../ThirdPartyLibs/Recast/Recast/Include/Recast.h"
  580. #include "../../../ThirdPartyLibs/Recast/Recast/Include/RecastAlloc.h"
  581. #include "../../../ThirdPartyLibs/Recast/Detour/Include/DetourNavMesh.h"
  582. #include "../../../ThirdPartyLibs/Recast/Detour/Include/DetourNavMeshQuery.h"
  583. #include "../../../ThirdPartyLibs/Recast/Detour/Include/DetourNavMeshBuilder.h"
  584. // SSL/TLS/HTTPS
  585. #define SUPPORT_MBED_TLS (!WEB)
  586. #if SUPPORT_MBED_TLS
  587. #include "../../../ThirdPartyLibs/mbedTLS/lib/include/mbedtls/config.h"
  588. #ifdef MBEDTLS_PLATFORM_C
  589. #include "../../../ThirdPartyLibs/mbedTLS/lib/include/mbedtls/platform.h"
  590. #else
  591. #define mbedtls_time time
  592. #define mbedtls_time_t time_t
  593. #define mbedtls_fprintf fprintf
  594. #define mbedtls_printf printf
  595. #endif
  596. #include "../../../ThirdPartyLibs/mbedTLS/lib/include/mbedtls/net_sockets.h"
  597. #include "../../../ThirdPartyLibs/mbedTLS/lib/include/mbedtls/debug.h"
  598. #include "../../../ThirdPartyLibs/mbedTLS/lib/include/mbedtls/ssl.h"
  599. #include "../../../ThirdPartyLibs/mbedTLS/lib/include/mbedtls/entropy.h"
  600. #include "../../../ThirdPartyLibs/mbedTLS/lib/include/mbedtls/ctr_drbg.h"
  601. #include "../../../ThirdPartyLibs/mbedTLS/lib/include/mbedtls/error.h"
  602. #include "../../../ThirdPartyLibs/mbedTLS/lib/include/mbedtls/certs.h"
  603. #endif
  604. #include <algorithm> // must be after PhysX or compile errors will show on Android
  605. /******************************************************************************/
  606. // Finish including headers - this needs to be included after all headers
  607. #include "../../../ThirdPartyLibs/end.h"
  608. /******************************************************************************/
  609. #else
  610. #if WINDOWS
  611. #ifndef __PLACEMENT_NEW_INLINE
  612. #define __PLACEMENT_NEW_INLINE
  613. inline void* __cdecl operator new (size_t, void *where) {return where;}
  614. inline void __cdecl operator delete(void *, void * )throw() {}
  615. #endif
  616. #undef GetComputerName
  617. #undef TRANSPARENT
  618. #undef ERROR
  619. #undef INPUT_MOUSE
  620. #undef INPUT_KEYBOARD
  621. #undef min
  622. #undef max
  623. #define _ALLOW_RTCc_IN_STL
  624. #else
  625. #include <new>
  626. #include <stdint.h>
  627. #include <stddef.h>
  628. #endif
  629. #include <math.h>
  630. #include <typeinfo>
  631. #include <type_traits> // needed for 'std::enable_if', 'std::is_enum'
  632. #if ANDROID
  633. #include <android/api-level.h> // needed for __ANDROID_API__
  634. #endif
  635. #endif
  636. #if !WINDOWS_NEW
  637. namespace std{typedef decltype(nullptr) nullptr_t;}
  638. #endif
  639. /******************************************************************************/