BsCorePrerequisites.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "Prerequisites/BsPrerequisitesUtil.h"
  5. /** @addtogroup Layers
  6. * @{
  7. */
  8. /** @defgroup Core Core
  9. * Second lowest layer that provides core engine functionality and abstract interfaces for various systems.
  10. * @{
  11. */
  12. /** @defgroup Animation Animation
  13. * %Animation clips, skeletal and blend shape animation, animation playback, blending and other features.
  14. */
  15. /** @defgroup Application-Core Application
  16. * Entry point into the application and other general functionality.
  17. */
  18. /** @defgroup Audio Audio
  19. * %Audio clips, 3D sound and music reproduction.
  20. */
  21. /** @defgroup Components-Core Components
  22. * Built-in components (elements that may be attached to scene objects).
  23. */
  24. /** @defgroup CoreThread Core thread
  25. * Core objects and interaction with the core (rendering) thread.
  26. */
  27. /** @defgroup Importer Importer
  28. * Import of resources into engine friendly format.
  29. */
  30. /** @defgroup Input Input
  31. * %Input (mouse, keyboard, gamepad, etc.).
  32. */
  33. /** @defgroup Localization Localization
  34. * GUI localization.
  35. */
  36. /** @defgroup Material Material
  37. * Materials, shaders and related functionality.
  38. */
  39. /** @defgroup Physics Physics
  40. * %Physics system: colliders, triggers, rigidbodies, joints, scene queries, etc.
  41. */
  42. /** @defgroup Profiling Profiling
  43. * Measuring CPU and GPU execution times and memory usage.
  44. */
  45. /** @defgroup RenderAPI RenderAPI
  46. * Interface for interacting with the render API (DirectX, OpenGL, etc.).
  47. */
  48. /** @defgroup Renderer Renderer
  49. * Abstract interface and helper functionality for rendering scene objects.
  50. */
  51. /** @defgroup Resources Resources
  52. * Core resource types and resource management functionality (loading, saving, etc.).
  53. */
  54. /** @cond RTTI */
  55. /** @defgroup RTTI-Impl-Core RTTI types
  56. * RTTI implementations for classes within the core layer.
  57. */
  58. /** @endcond */
  59. /** @defgroup Scene Scene
  60. * Managing scene objects and their hierarchy.
  61. */
  62. /** @defgroup Text Text
  63. * Generating text geometry.
  64. */
  65. /** @defgroup Utility-Core Utility
  66. * Various utility methods and types used by the core layer.
  67. */
  68. /** @} */
  69. /** @} */
  70. /** @addtogroup Internals
  71. * @{
  72. */
  73. /** @defgroup Internal-Core Core
  74. * Second lowest layer that provides core engine functionality and abstract interfaces for various systems.
  75. * @{
  76. */
  77. /** @defgroup Animation-Internal Animation
  78. * Animation clips, skeletal and blend shape animation, animation playback, blending and other features.
  79. */
  80. /** @defgroup Audio-Internal Audio
  81. * Audio clips, 3D sound and music reproduction.
  82. */
  83. /** @defgroup CoreThread-Internal Core thread
  84. * Core objects and interaction with the core (rendering) thread.
  85. */
  86. /** @defgroup Importer-Internal Importer
  87. * Import of resources into engine friendly format.
  88. */
  89. /** @defgroup Input-Internal Input
  90. * Input (mouse, keyboard, gamepad, etc.).
  91. */
  92. /** @defgroup Localization-Internal Localization
  93. * GUI localization.
  94. */
  95. /** @defgroup Material-Internal Material
  96. * Materials, shaders and related functionality.
  97. */
  98. /** @defgroup Physics-Internal Physics
  99. * Physics system: colliders, triggers, rigidbodies, joints, scene queries, etc.
  100. */
  101. /** @defgroup Platform-Internal Platform
  102. * Interface for interacting with the platform (OS).
  103. */
  104. /** @defgroup Profiling-Internal Profiling
  105. * Measuring CPU and GPU execution times and memory usage.
  106. */
  107. /** @defgroup RenderAPI-Internal RenderAPI
  108. * Interface for interacting with the render API (DirectX, OpenGL, etc.).
  109. */
  110. /** @defgroup Renderer-Internal Renderer
  111. * Abstract interface and helper functionality for rendering scene objects.
  112. */
  113. /** @defgroup Resources-Internal Resources
  114. * Core resource types and resource management functionality (loading, saving, etc.).
  115. */
  116. /** @defgroup Scene-Internal Scene
  117. * Managing scene objects and their hierarchy.
  118. */
  119. /** @defgroup Text-Internal Text
  120. * Generating text geometry.
  121. */
  122. /** @defgroup Utility-Core-Internal Utility
  123. * Various utility methods and types used by the core layer.
  124. */
  125. /** @} */
  126. /** @} */
  127. /** Maximum number of color surfaces that can be attached to a multi render target. */
  128. #define BS_MAX_MULTIPLE_RENDER_TARGETS 8
  129. #define BS_FORCE_SINGLETHREADED_RENDERING 0
  130. /** Maximum number of individual GPU queues, per type. */
  131. #define BS_MAX_QUEUES_PER_TYPE 8
  132. /** Maximum number of hardware devices usable at once. */
  133. #define BS_MAX_DEVICES 5U
  134. /** Maximum number of devices one resource can exist at the same time. */
  135. #define BS_MAX_LINKED_DEVICES 4U
  136. // DLL export
  137. #if BS_PLATFORM == BS_PLATFORM_WIN32 // Windows
  138. # if BS_COMPILER == BS_COMPILER_MSVC
  139. # if defined(BS_STATIC_LIB)
  140. # define BS_CORE_EXPORT
  141. # else
  142. # if defined(BS_CORE_EXPORTS)
  143. # define BS_CORE_EXPORT __declspec(dllexport)
  144. # else
  145. # define BS_CORE_EXPORT __declspec(dllimport)
  146. # endif
  147. # endif
  148. # else
  149. # if defined(BS_STATIC_LIB)
  150. # define BS_CORE_EXPORT
  151. # else
  152. # if defined(BS_CORE_EXPORTS)
  153. # define BS_CORE_EXPORT __attribute__ ((dllexport))
  154. # else
  155. # define BS_CORE_EXPORT __attribute__ ((dllimport))
  156. # endif
  157. # endif
  158. # endif
  159. # define BS_CORE_HIDDEN
  160. #else // Linux/Mac settings
  161. # define BS_CORE_EXPORT __attribute__ ((visibility ("default")))
  162. # define BS_CORE_HIDDEN __attribute__ ((visibility ("hidden")))
  163. #endif
  164. #include "Localization/BsHString.h"
  165. #include "String/BsStringID.h"
  166. namespace bs
  167. {
  168. static const StringID RenderAPIAny = "AnyRenderAPI";
  169. static const StringID RendererAny = "AnyRenderer";
  170. class Color;
  171. class GpuProgram;
  172. class GpuProgramManager;
  173. class IndexBuffer;
  174. class VertexBuffer;
  175. class GpuBuffer;
  176. class GpuProgramManager;
  177. class GpuProgramFactory;
  178. class IndexData;
  179. class Pass;
  180. class Technique;
  181. class Shader;
  182. class Material;
  183. class RenderAPICapabilities;
  184. class RenderTarget;
  185. class RenderTexture;
  186. class RenderWindow;
  187. class RenderTargetProperties;
  188. class SamplerState;
  189. class TextureManager;
  190. class Viewport;
  191. class VertexDeclaration;
  192. class Input;
  193. struct PointerEvent;
  194. class RendererFactory;
  195. class AsyncOp;
  196. class HardwareBufferManager;
  197. class FontManager;
  198. class DepthStencilState;
  199. class RenderStateManager;
  200. class RasterizerState;
  201. class BlendState;
  202. class GpuParamBlock;
  203. class GpuParamBlockBuffer;
  204. class GpuParams;
  205. struct GpuParamDesc;
  206. struct GpuParamDataDesc;
  207. struct GpuParamObjectDesc;
  208. struct GpuParamBlockDesc;
  209. class ShaderInclude;
  210. class CoreObject;
  211. class ImportOptions;
  212. class TextureImportOptions;
  213. class FontImportOptions;
  214. class GpuProgramImportOptions;
  215. class MeshImportOptions;
  216. struct FontBitmap;
  217. class GameObject;
  218. class GpuResourceData;
  219. struct RenderOperation;
  220. class RenderQueue;
  221. struct ProfilerReport;
  222. class VertexDataDesc;
  223. class FrameAlloc;
  224. class FolderMonitor;
  225. class VideoMode;
  226. class VideoOutputInfo;
  227. class VideoModeInfo;
  228. struct SubMesh;
  229. class IResourceListener;
  230. class TextureProperties;
  231. class IShaderIncludeHandler;
  232. class Prefab;
  233. class PrefabDiff;
  234. class RendererMeshData;
  235. class Light;
  236. class Win32Window;
  237. class RenderAPIFactory;
  238. class PhysicsManager;
  239. class Physics;
  240. class FCollider;
  241. class Collider;
  242. class Rigidbody;
  243. class PhysicsMaterial;
  244. class BoxCollider;
  245. class SphereCollider;
  246. class PlaneCollider;
  247. class CapsuleCollider;
  248. class MeshCollider;
  249. class CCollider;
  250. class CRigidbody;
  251. class CBoxCollider;
  252. class CSphereCollider;
  253. class CPlaneCollider;
  254. class CCapsuleCollider;
  255. class CMeshCollider;
  256. class Joint;
  257. class FixedJoint;
  258. class DistanceJoint;
  259. class HingeJoint;
  260. class SphericalJoint;
  261. class SliderJoint;
  262. class D6Joint;
  263. class CharacterController;
  264. class CJoint;
  265. class CHingeJoint;
  266. class CDistanceJoint;
  267. class CFixedJoint;
  268. class CSphericalJoint;
  269. class CSliderJoint;
  270. class CD6Joint;
  271. class CCharacterController;
  272. class ShaderDefines;
  273. class ShaderImportOptions;
  274. class AudioListener;
  275. class AudioSource;
  276. class AudioClipImportOptions;
  277. class AnimationClip;
  278. class CCamera;
  279. class CRenderable;
  280. class CLight;
  281. class CAnimation;
  282. class CBone;
  283. class CAudioSource;
  284. class CAudioListener;
  285. class GpuPipelineParamInfo;
  286. class MaterialParams;
  287. template <class T> class TAnimationCurve;
  288. struct AnimationCurves;
  289. class Skeleton;
  290. class Animation;
  291. class GpuParamsSet;
  292. class Camera;
  293. class Renderable;
  294. class MorphShapes;
  295. class MorphShape;
  296. class MorphChannel;
  297. class GraphicsPipelineState;
  298. class ComputePipelineState;
  299. class ReflectionProbe;
  300. class CReflectionProbe;
  301. class CSkybox;
  302. class CLightProbeVolume;
  303. class Transform;
  304. class SceneActor;
  305. // Asset import
  306. class SpecificImporter;
  307. class Importer;
  308. // Resources
  309. class Resource;
  310. class Resources;
  311. class ResourceManifest;
  312. class Texture;
  313. class Mesh;
  314. class MeshBase;
  315. class TransientMesh;
  316. class MeshHeap;
  317. class Font;
  318. class ResourceMetaData;
  319. class DropTarget;
  320. class StringTable;
  321. class PhysicsMaterial;
  322. class PhysicsMesh;
  323. class AudioClip;
  324. class CoreObjectManager;
  325. struct CollisionData;
  326. // Scene
  327. class SceneObject;
  328. class Component;
  329. class SceneManager;
  330. // RTTI
  331. class MeshRTTI;
  332. // Desc structs
  333. struct SAMPLER_STATE_DESC;
  334. struct DEPTH_STENCIL_STATE_DESC;
  335. struct RASTERIZER_STATE_DESC;
  336. struct BLEND_STATE_DESC;
  337. struct RENDER_TARGET_BLEND_STATE_DESC;
  338. struct RENDER_TEXTURE_DESC;
  339. struct RENDER_WINDOW_DESC;
  340. struct FONT_DESC;
  341. struct CHAR_CONTROLLER_DESC;
  342. struct JOINT_DESC;
  343. struct FIXED_JOINT_DESC;
  344. struct DISTANCE_JOINT_DESC;
  345. struct HINGE_JOINT_DESC;
  346. struct SLIDER_JOINT_DESC;
  347. struct SPHERICAL_JOINT_DESC;
  348. struct D6_JOINT_DESC;
  349. struct AUDIO_CLIP_DESC;
  350. template<class T>
  351. class TCoreThreadQueue;
  352. class CommandQueueNoSync;
  353. class CommandQueueSync;
  354. namespace ct
  355. {
  356. class Renderer;
  357. class VertexData;
  358. class SamplerState;
  359. class IndexBuffer;
  360. class VertexBuffer;
  361. class RenderAPI;
  362. class RenderTarget;
  363. class RenderTexture;
  364. class RenderWindow;
  365. class DepthStencilState;
  366. class RasterizerState;
  367. class BlendState;
  368. class CoreObject;
  369. class Camera;
  370. class Renderable;
  371. class MeshBase;
  372. class Mesh;
  373. class TransientMesh;
  374. class Texture;
  375. class MeshHeap;
  376. class VertexDeclaration;
  377. class GpuBuffer;
  378. class GpuParamBlockBuffer;
  379. class GpuParams;
  380. class Shader;
  381. class Viewport;
  382. class Pass;
  383. class GpuParamsSet;
  384. class Technique;
  385. class Material;
  386. class GpuProgram;
  387. class Light;
  388. class ComputePipelineState;
  389. class GraphicsPipelineState;
  390. class Camera;
  391. class GpuParamsSet;
  392. class MaterialParams;
  393. class GpuPipelineParamInfo;
  394. class CommandBuffer;
  395. class EventQuery;
  396. class TimerQuery;
  397. class OcclusionQuery;
  398. class TextureView;
  399. class RenderableElement;
  400. class RenderWindowManager;
  401. class RenderStateManager;
  402. class HardwareBufferManager;
  403. class ReflectionProbe;
  404. class Skybox;
  405. }
  406. }
  407. /************************************************************************/
  408. /* Typedefs */
  409. /************************************************************************/
  410. namespace bs
  411. {
  412. typedef TCoreThreadQueue<CommandQueueNoSync> CoreThreadQueue;
  413. }
  414. /************************************************************************/
  415. /* RTTI */
  416. /************************************************************************/
  417. namespace bs
  418. {
  419. enum TypeID_Core
  420. {
  421. TID_Texture = 1001,
  422. TID_Mesh = 1002,
  423. TID_MeshData = 1003,
  424. TID_VertexDeclaration = 1004,
  425. TID_VertexElementData = 1005,
  426. TID_Component = 1006,
  427. TID_ResourceHandle = 1009,
  428. TID_GpuProgram = 1010,
  429. TID_ResourceHandleData = 1011,
  430. TID_CgProgram = 1012,
  431. TID_Pass = 1014,
  432. TID_Technique = 1015,
  433. TID_Shader = 1016,
  434. TID_Material = 1017,
  435. TID_SamplerState = 1021,
  436. TID_BlendState = 1023,
  437. TID_RasterizerState = 1024,
  438. TID_DepthStencilState = 1025,
  439. TID_BLEND_STATE_DESC = 1034,
  440. TID_SHADER_DATA_PARAM_DESC = 1035,
  441. TID_SHADER_OBJECT_PARAM_DESC = 1036,
  442. TID_SHADER_PARAM_BLOCK_DESC = 1047,
  443. TID_ImportOptions = 1048,
  444. TID_Font = 1051,
  445. TID_FONT_DESC = 1052,
  446. TID_CHAR_DESC = 1053,
  447. TID_FontImportOptions = 1056,
  448. TID_FontBitmap = 1057,
  449. TID_SceneObject = 1059,
  450. TID_GameObject = 1060,
  451. TID_PixelData = 1062,
  452. TID_GpuResourceData = 1063,
  453. TID_VertexDataDesc = 1064,
  454. TID_MeshBase = 1065,
  455. TID_GameObjectHandleBase = 1066,
  456. TID_ResourceManifest = 1067,
  457. TID_ResourceManifestEntry = 1068,
  458. TID_EmulatedParamBlock = 1069,
  459. TID_TextureImportOptions = 1070,
  460. TID_ResourceMetaData = 1071,
  461. TID_ShaderInclude = 1072,
  462. TID_Viewport = 1073,
  463. TID_ResourceDependencies = 1074,
  464. TID_ShaderMetaData = 1075,
  465. TID_MeshImportOptions = 1076,
  466. TID_Prefab = 1077,
  467. TID_PrefabDiff = 1078,
  468. TID_PrefabObjectDiff = 1079,
  469. TID_PrefabComponentDiff = 1080,
  470. TID_CGUIWidget = 1081,
  471. TID_ProfilerOverlay = 1082,
  472. TID_StringTable = 1083,
  473. TID_LanguageData = 1084,
  474. TID_LocalizedStringData = 1085,
  475. TID_MaterialParamColor = 1086,
  476. TID_WeakResourceHandle = 1087,
  477. TID_TextureParamData = 1088,
  478. TID_StructParamData = 1089,
  479. TID_MaterialParams = 1090,
  480. TID_MaterialRTTIParam = 1091,
  481. TID_PhysicsMaterial = 1092,
  482. TID_CCollider = 1093,
  483. TID_CBoxCollider = 1094,
  484. TID_CSphereCollider = 1095,
  485. TID_CCapsuleCollider = 1096,
  486. TID_CPlaneCollider = 1097,
  487. TID_CRigidbody = 1098,
  488. TID_PhysicsMesh = 1099,
  489. TID_CMeshCollider = 1100,
  490. TID_CJoint = 1101,
  491. TID_CFixedJoint = 1102,
  492. TID_CDistanceJoint = 1103,
  493. TID_CHingeJoint = 1104,
  494. TID_CSphericalJoint = 1105,
  495. TID_CSliderJoint = 1106,
  496. TID_CD6Joint = 1107,
  497. TID_CCharacterController = 1108,
  498. TID_FPhysicsMesh = 1109,
  499. TID_ShaderImportOptions = 1110,
  500. TID_AudioClip = 1111,
  501. TID_AudioClipImportOptions = 1112,
  502. TID_CAudioListener = 1113,
  503. TID_CAudioSource = 1114,
  504. TID_AnimationClip = 1115,
  505. TID_AnimationCurve = 1116,
  506. TID_KeyFrame = 1117,
  507. TID_NamedAnimationCurve = 1118,
  508. TID_Skeleton = 1119,
  509. TID_SkeletonBoneInfo = 1120,
  510. TID_AnimationSplitInfo = 1121,
  511. TID_CAnimation = 1122,
  512. TID_AnimationEvent = 1123,
  513. TID_ImportedAnimationEvents = 1124,
  514. TID_CBone = 1125,
  515. TID_MaterialParamData = 1126,
  516. TID_RenderSettings = 1127,
  517. TID_MorphShape = 1128,
  518. TID_MorphShapes = 1129,
  519. TID_MorphChannel = 1130,
  520. TID_ReflectionProbe = 1131,
  521. TID_CReflectionProbe = 1132,
  522. TID_CachedTextureData = 1133,
  523. TID_Skybox = 1134,
  524. TID_CSkybox = 1135,
  525. TID_LightProbeVolume = 1136,
  526. TID_SavedLightProbeInfo = 1137,
  527. TID_CLightProbeVolume = 1138,
  528. TID_Transform = 1139,
  529. TID_SceneActor = 1140,
  530. TID_AudioListener = 1141,
  531. TID_AudioSource = 1142,
  532. TID_ShaderVariationParam = 1143,
  533. TID_ShaderVariation = 1144,
  534. // Moved from Engine layer
  535. TID_CCamera = 30000,
  536. TID_Camera = 30003,
  537. TID_CRenderable = 30001,
  538. TID_Renderable = 30004,
  539. TID_Light = 30011,
  540. TID_CLight = 30012,
  541. TID_AutoExposureSettings = 30016,
  542. TID_TonemappingSettings = 30017,
  543. TID_WhiteBalanceSettings = 30018,
  544. TID_ColorGradingSettings = 30019,
  545. TID_DepthOfFieldSettings = 30020,
  546. TID_AmbientOcclusionSettings = 30021,
  547. TID_ScreenSpaceReflectionsSettings = 30022
  548. };
  549. }
  550. /************************************************************************/
  551. /* Resource references */
  552. /************************************************************************/
  553. #include "Resources/BsResourceHandle.h"
  554. namespace bs
  555. {
  556. /** @addtogroup Resources
  557. * @{
  558. */
  559. typedef ResourceHandle<Resource> HResource;
  560. typedef ResourceHandle<Texture> HTexture;
  561. typedef ResourceHandle<Mesh> HMesh;
  562. typedef ResourceHandle<Material> HMaterial;
  563. typedef ResourceHandle<ShaderInclude> HShaderInclude;
  564. typedef ResourceHandle<Font> HFont;
  565. typedef ResourceHandle<Shader> HShader;
  566. typedef ResourceHandle<Prefab> HPrefab;
  567. typedef ResourceHandle<StringTable> HStringTable;
  568. typedef ResourceHandle<PhysicsMaterial> HPhysicsMaterial;
  569. typedef ResourceHandle<PhysicsMesh> HPhysicsMesh;
  570. typedef ResourceHandle<AudioClip> HAudioClip;
  571. typedef ResourceHandle<AnimationClip> HAnimationClip;
  572. /** @} */
  573. }
  574. #include "Scene/BsGameObjectHandle.h"
  575. namespace bs
  576. {
  577. /** @addtogroup Scene
  578. * @{
  579. */
  580. // Game object handles
  581. typedef GameObjectHandle<GameObject> HGameObject;
  582. typedef GameObjectHandle<SceneObject> HSceneObject;
  583. typedef GameObjectHandle<Component> HComponent;
  584. typedef GameObjectHandle<CCamera> HCamera;
  585. typedef GameObjectHandle<CRenderable> HRenderable;
  586. typedef GameObjectHandle<CLight> HLight;
  587. typedef GameObjectHandle<CAnimation> HAnimation;
  588. typedef GameObjectHandle<CBone> HBone;
  589. typedef GameObjectHandle<CRigidbody> HRigidbody;
  590. typedef GameObjectHandle<CCollider> HCollider;
  591. typedef GameObjectHandle<CBoxCollider> HBoxCollider;
  592. typedef GameObjectHandle<CSphereCollider> HSphereCollider;
  593. typedef GameObjectHandle<CCapsuleCollider> HCapsuleCollider;
  594. typedef GameObjectHandle<CPlaneCollider> HPlaneCollider;
  595. typedef GameObjectHandle<CJoint> HJoint;
  596. typedef GameObjectHandle<CHingeJoint> HHingeJoint;
  597. typedef GameObjectHandle<CSliderJoint> HSliderJoint;
  598. typedef GameObjectHandle<CDistanceJoint> HDistanceJoint;
  599. typedef GameObjectHandle<CSphericalJoint> HSphericalJoint;
  600. typedef GameObjectHandle<CFixedJoint> HFixedJoint;
  601. typedef GameObjectHandle<CD6Joint> HD6Joint;
  602. typedef GameObjectHandle<CCharacterController> HCharacterController;
  603. typedef GameObjectHandle<CReflectionProbe> HReflectionProbe;
  604. typedef GameObjectHandle<CSkybox> HSkybox;
  605. typedef GameObjectHandle<CLightProbeVolume> HLightProbeVolume;
  606. typedef GameObjectHandle<CAudioSource> HAudioSource;
  607. typedef GameObjectHandle<CAudioListener> HAudioListener;
  608. /** @} */
  609. }
  610. namespace bs
  611. {
  612. /**
  613. * Defers function execution until the next frame. If this function is called within another deferred call, then it will
  614. * be executed the same frame, but only after all existing deferred calls are done.
  615. *
  616. * @note
  617. * This method can be used for breaking dependencies among other things. If a class A depends on class B having
  618. * something done, but class B also depends in some way on class A, you can break up the initialization into two
  619. * separate steps, queuing the second step using this method.
  620. * @note
  621. * Similar situation can happen if you have multiple classes being initialized in an undefined order but some of them
  622. * depend on others. Using this method you can defer the dependent step until next frame, which will ensure everything
  623. * was initialized.
  624. *
  625. * @param[in] callback The callback.
  626. */
  627. void BS_CORE_EXPORT deferredCall(std::function<void()> callback);
  628. // Special types for use by profilers
  629. typedef std::basic_string<char, std::char_traits<char>, StdAlloc<char, ProfilerAlloc>> ProfilerString;
  630. template <typename T, typename A = StdAlloc<T, ProfilerAlloc>>
  631. using ProfilerVector = std::vector<T, A>;
  632. template <typename T, typename A = StdAlloc<T, ProfilerAlloc>>
  633. using ProfilerStack = std::stack<T, std::deque<T, A>>;
  634. /** Banshee thread policy that performs special startup/shutdown on threads managed by thread pool. */
  635. class BS_CORE_EXPORT ThreadBansheePolicy
  636. {
  637. public:
  638. static void onThreadStarted(const String& name)
  639. {
  640. MemStack::beginThread();
  641. }
  642. static void onThreadEnded(const String& name)
  643. {
  644. MemStack::endThread();
  645. }
  646. };
  647. #define BS_ALL_LAYERS 0xFFFFFFFFFFFFFFFF
  648. }
  649. #include "Utility/BsCommonTypes.h"