BsCorePrerequisites.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  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. class Color;
  169. class GpuProgram;
  170. class GpuProgramManager;
  171. class IndexBuffer;
  172. class VertexBuffer;
  173. class GpuBuffer;
  174. class GpuProgramManager;
  175. class GpuProgramFactory;
  176. class IndexData;
  177. class Pass;
  178. class Technique;
  179. class Shader;
  180. class Material;
  181. class RenderAPICapabilities;
  182. class RenderTarget;
  183. class RenderTexture;
  184. class RenderWindow;
  185. class RenderTargetProperties;
  186. class SamplerState;
  187. class TextureManager;
  188. class Viewport;
  189. class VertexDeclaration;
  190. class Input;
  191. struct PointerEvent;
  192. class RendererFactory;
  193. class AsyncOp;
  194. class HardwareBufferManager;
  195. class FontManager;
  196. class DepthStencilState;
  197. class RenderStateManager;
  198. class RasterizerState;
  199. class BlendState;
  200. class GpuParamBlock;
  201. class GpuParamBlockBuffer;
  202. class GpuParams;
  203. struct GpuParamDesc;
  204. struct GpuParamDataDesc;
  205. struct GpuParamObjectDesc;
  206. struct GpuParamBlockDesc;
  207. class ShaderInclude;
  208. class CoreObject;
  209. class ImportOptions;
  210. class TextureImportOptions;
  211. class FontImportOptions;
  212. class GpuProgramImportOptions;
  213. class MeshImportOptions;
  214. struct FontBitmap;
  215. class GameObject;
  216. class GpuResourceData;
  217. struct RenderOperation;
  218. class RenderQueue;
  219. struct ProfilerReport;
  220. class VertexDataDesc;
  221. class FrameAlloc;
  222. class FolderMonitor;
  223. class VideoMode;
  224. class VideoOutputInfo;
  225. class VideoModeInfo;
  226. struct SubMesh;
  227. class IResourceListener;
  228. class TextureProperties;
  229. class IShaderIncludeHandler;
  230. class Prefab;
  231. class PrefabDiff;
  232. class RendererMeshData;
  233. class Light;
  234. class Win32Window;
  235. class RenderAPIFactory;
  236. class PhysicsManager;
  237. class Physics;
  238. class FCollider;
  239. class Collider;
  240. class Rigidbody;
  241. class PhysicsMaterial;
  242. class BoxCollider;
  243. class SphereCollider;
  244. class PlaneCollider;
  245. class CapsuleCollider;
  246. class MeshCollider;
  247. class CCollider;
  248. class CRigidbody;
  249. class CBoxCollider;
  250. class CSphereCollider;
  251. class CPlaneCollider;
  252. class CCapsuleCollider;
  253. class CMeshCollider;
  254. class Joint;
  255. class FixedJoint;
  256. class DistanceJoint;
  257. class HingeJoint;
  258. class SphericalJoint;
  259. class SliderJoint;
  260. class D6Joint;
  261. class CharacterController;
  262. class CJoint;
  263. class CHingeJoint;
  264. class CDistanceJoint;
  265. class CFixedJoint;
  266. class CSphericalJoint;
  267. class CSliderJoint;
  268. class CD6Joint;
  269. class CCharacterController;
  270. class ShaderDefines;
  271. class ShaderImportOptions;
  272. class AudioListener;
  273. class AudioSource;
  274. class AudioClipImportOptions;
  275. class AnimationClip;
  276. class CCamera;
  277. class CRenderable;
  278. class CLight;
  279. class CAnimation;
  280. class CBone;
  281. class CAudioSource;
  282. class CAudioListener;
  283. class GpuPipelineParamInfo;
  284. class MaterialParams;
  285. template <class T> class TAnimationCurve;
  286. struct AnimationCurves;
  287. class Skeleton;
  288. class Animation;
  289. class GpuParamsSet;
  290. class Camera;
  291. class Renderable;
  292. class MorphShapes;
  293. class MorphShape;
  294. class MorphChannel;
  295. class GraphicsPipelineState;
  296. class ComputePipelineState;
  297. class ReflectionProbe;
  298. class CReflectionProbe;
  299. class CSkybox;
  300. class CLightProbeVolume;
  301. class Transform;
  302. class SceneActor;
  303. // Asset import
  304. class SpecificImporter;
  305. class Importer;
  306. // Resources
  307. class Resource;
  308. class Resources;
  309. class ResourceManifest;
  310. class Texture;
  311. class Mesh;
  312. class MeshBase;
  313. class TransientMesh;
  314. class MeshHeap;
  315. class Font;
  316. class ResourceMetaData;
  317. class DropTarget;
  318. class StringTable;
  319. class PhysicsMaterial;
  320. class PhysicsMesh;
  321. class AudioClip;
  322. class CoreObjectManager;
  323. struct CollisionData;
  324. // Scene
  325. class SceneObject;
  326. class Component;
  327. class SceneManager;
  328. // RTTI
  329. class MeshRTTI;
  330. // Desc structs
  331. struct SAMPLER_STATE_DESC;
  332. struct DEPTH_STENCIL_STATE_DESC;
  333. struct RASTERIZER_STATE_DESC;
  334. struct BLEND_STATE_DESC;
  335. struct RENDER_TARGET_BLEND_STATE_DESC;
  336. struct RENDER_TEXTURE_DESC;
  337. struct RENDER_WINDOW_DESC;
  338. struct FONT_DESC;
  339. struct CHAR_CONTROLLER_DESC;
  340. struct JOINT_DESC;
  341. struct FIXED_JOINT_DESC;
  342. struct DISTANCE_JOINT_DESC;
  343. struct HINGE_JOINT_DESC;
  344. struct SLIDER_JOINT_DESC;
  345. struct SPHERICAL_JOINT_DESC;
  346. struct D6_JOINT_DESC;
  347. struct AUDIO_CLIP_DESC;
  348. template<class T>
  349. class TCoreThreadQueue;
  350. class CommandQueueNoSync;
  351. class CommandQueueSync;
  352. namespace ct
  353. {
  354. class Renderer;
  355. class VertexData;
  356. class SamplerState;
  357. class IndexBuffer;
  358. class VertexBuffer;
  359. class RenderAPI;
  360. class RenderTarget;
  361. class RenderTexture;
  362. class RenderWindow;
  363. class DepthStencilState;
  364. class RasterizerState;
  365. class BlendState;
  366. class CoreObject;
  367. class Camera;
  368. class Renderable;
  369. class MeshBase;
  370. class Mesh;
  371. class TransientMesh;
  372. class Texture;
  373. class MeshHeap;
  374. class VertexDeclaration;
  375. class GpuBuffer;
  376. class GpuParamBlockBuffer;
  377. class GpuParams;
  378. class Shader;
  379. class Viewport;
  380. class Pass;
  381. class GpuParamsSet;
  382. class Technique;
  383. class Material;
  384. class GpuProgram;
  385. class Light;
  386. class ComputePipelineState;
  387. class GraphicsPipelineState;
  388. class Camera;
  389. class GpuParamsSet;
  390. class MaterialParams;
  391. class GpuPipelineParamInfo;
  392. class CommandBuffer;
  393. class EventQuery;
  394. class TimerQuery;
  395. class OcclusionQuery;
  396. class TextureView;
  397. class RenderableElement;
  398. class RenderWindowManager;
  399. class RenderStateManager;
  400. class HardwareBufferManager;
  401. class ReflectionProbe;
  402. class Skybox;
  403. }
  404. }
  405. /************************************************************************/
  406. /* Typedefs */
  407. /************************************************************************/
  408. namespace bs
  409. {
  410. typedef TCoreThreadQueue<CommandQueueNoSync> CoreThreadQueue;
  411. }
  412. /************************************************************************/
  413. /* RTTI */
  414. /************************************************************************/
  415. namespace bs
  416. {
  417. enum TypeID_Core
  418. {
  419. TID_Texture = 1001,
  420. TID_Mesh = 1002,
  421. TID_MeshData = 1003,
  422. TID_VertexDeclaration = 1004,
  423. TID_VertexElementData = 1005,
  424. TID_Component = 1006,
  425. TID_ResourceHandle = 1009,
  426. TID_GpuProgram = 1010,
  427. TID_ResourceHandleData = 1011,
  428. TID_CgProgram = 1012,
  429. TID_Pass = 1014,
  430. TID_Technique = 1015,
  431. TID_Shader = 1016,
  432. TID_Material = 1017,
  433. TID_SamplerState = 1021,
  434. TID_BlendState = 1023,
  435. TID_RasterizerState = 1024,
  436. TID_DepthStencilState = 1025,
  437. TID_BLEND_STATE_DESC = 1034,
  438. TID_SHADER_DATA_PARAM_DESC = 1035,
  439. TID_SHADER_OBJECT_PARAM_DESC = 1036,
  440. TID_SHADER_PARAM_BLOCK_DESC = 1047,
  441. TID_ImportOptions = 1048,
  442. TID_Font = 1051,
  443. TID_FONT_DESC = 1052,
  444. TID_CHAR_DESC = 1053,
  445. TID_FontImportOptions = 1056,
  446. TID_FontBitmap = 1057,
  447. TID_SceneObject = 1059,
  448. TID_GameObject = 1060,
  449. TID_PixelData = 1062,
  450. TID_GpuResourceData = 1063,
  451. TID_VertexDataDesc = 1064,
  452. TID_MeshBase = 1065,
  453. TID_GameObjectHandleBase = 1066,
  454. TID_ResourceManifest = 1067,
  455. TID_ResourceManifestEntry = 1068,
  456. TID_EmulatedParamBlock = 1069,
  457. TID_TextureImportOptions = 1070,
  458. TID_ResourceMetaData = 1071,
  459. TID_ShaderInclude = 1072,
  460. TID_Viewport = 1073,
  461. TID_ResourceDependencies = 1074,
  462. TID_ShaderMetaData = 1075,
  463. TID_MeshImportOptions = 1076,
  464. TID_Prefab = 1077,
  465. TID_PrefabDiff = 1078,
  466. TID_PrefabObjectDiff = 1079,
  467. TID_PrefabComponentDiff = 1080,
  468. TID_CGUIWidget = 1081,
  469. TID_ProfilerOverlay = 1082,
  470. TID_StringTable = 1083,
  471. TID_LanguageData = 1084,
  472. TID_LocalizedStringData = 1085,
  473. TID_MaterialParamColor = 1086,
  474. TID_WeakResourceHandle = 1087,
  475. TID_TextureParamData = 1088,
  476. TID_StructParamData = 1089,
  477. TID_MaterialParams = 1090,
  478. TID_MaterialRTTIParam = 1091,
  479. TID_PhysicsMaterial = 1092,
  480. TID_CCollider = 1093,
  481. TID_CBoxCollider = 1094,
  482. TID_CSphereCollider = 1095,
  483. TID_CCapsuleCollider = 1096,
  484. TID_CPlaneCollider = 1097,
  485. TID_CRigidbody = 1098,
  486. TID_PhysicsMesh = 1099,
  487. TID_CMeshCollider = 1100,
  488. TID_CJoint = 1101,
  489. TID_CFixedJoint = 1102,
  490. TID_CDistanceJoint = 1103,
  491. TID_CHingeJoint = 1104,
  492. TID_CSphericalJoint = 1105,
  493. TID_CSliderJoint = 1106,
  494. TID_CD6Joint = 1107,
  495. TID_CCharacterController = 1108,
  496. TID_FPhysicsMesh = 1109,
  497. TID_ShaderImportOptions = 1110,
  498. TID_AudioClip = 1111,
  499. TID_AudioClipImportOptions = 1112,
  500. TID_CAudioListener = 1113,
  501. TID_CAudioSource = 1114,
  502. TID_AnimationClip = 1115,
  503. TID_AnimationCurve = 1116,
  504. TID_KeyFrame = 1117,
  505. TID_NamedAnimationCurve = 1118,
  506. TID_Skeleton = 1119,
  507. TID_SkeletonBoneInfo = 1120,
  508. TID_AnimationSplitInfo = 1121,
  509. TID_CAnimation = 1122,
  510. TID_AnimationEvent = 1123,
  511. TID_ImportedAnimationEvents = 1124,
  512. TID_CBone = 1125,
  513. TID_MaterialParamData = 1126,
  514. TID_RenderSettings = 1127,
  515. TID_MorphShape = 1128,
  516. TID_MorphShapes = 1129,
  517. TID_MorphChannel = 1130,
  518. TID_ReflectionProbe = 1131,
  519. TID_CReflectionProbe = 1132,
  520. TID_CachedTextureData = 1133,
  521. TID_Skybox = 1134,
  522. TID_CSkybox = 1135,
  523. TID_LightProbeVolume = 1136,
  524. TID_SavedLightProbeInfo = 1137,
  525. TID_CLightProbeVolume = 1138,
  526. TID_Transform = 1139,
  527. TID_SceneActor = 1140,
  528. TID_AudioListener = 1141,
  529. TID_AudioSource = 1142,
  530. TID_ShaderVariationParam = 1143,
  531. TID_ShaderVariation = 1144,
  532. // Moved from Engine layer
  533. TID_CCamera = 30000,
  534. TID_Camera = 30003,
  535. TID_CRenderable = 30001,
  536. TID_Renderable = 30004,
  537. TID_Light = 30011,
  538. TID_CLight = 30012,
  539. TID_AutoExposureSettings = 30016,
  540. TID_TonemappingSettings = 30017,
  541. TID_WhiteBalanceSettings = 30018,
  542. TID_ColorGradingSettings = 30019,
  543. TID_DepthOfFieldSettings = 30020,
  544. TID_AmbientOcclusionSettings = 30021,
  545. TID_ScreenSpaceReflectionsSettings = 30022,
  546. TID_ShadowSettings = 30023
  547. };
  548. }
  549. /************************************************************************/
  550. /* Resource references */
  551. /************************************************************************/
  552. #include "Resources/BsResourceHandle.h"
  553. namespace bs
  554. {
  555. /** @addtogroup Resources
  556. * @{
  557. */
  558. typedef ResourceHandle<Resource> HResource;
  559. typedef ResourceHandle<Texture> HTexture;
  560. typedef ResourceHandle<Mesh> HMesh;
  561. typedef ResourceHandle<Material> HMaterial;
  562. typedef ResourceHandle<ShaderInclude> HShaderInclude;
  563. typedef ResourceHandle<Font> HFont;
  564. typedef ResourceHandle<Shader> HShader;
  565. typedef ResourceHandle<Prefab> HPrefab;
  566. typedef ResourceHandle<StringTable> HStringTable;
  567. typedef ResourceHandle<PhysicsMaterial> HPhysicsMaterial;
  568. typedef ResourceHandle<PhysicsMesh> HPhysicsMesh;
  569. typedef ResourceHandle<AudioClip> HAudioClip;
  570. typedef ResourceHandle<AnimationClip> HAnimationClip;
  571. /** @} */
  572. }
  573. #include "Scene/BsGameObjectHandle.h"
  574. namespace bs
  575. {
  576. /** @addtogroup Scene
  577. * @{
  578. */
  579. // Game object handles
  580. typedef GameObjectHandle<GameObject> HGameObject;
  581. typedef GameObjectHandle<SceneObject> HSceneObject;
  582. typedef GameObjectHandle<Component> HComponent;
  583. typedef GameObjectHandle<CCamera> HCamera;
  584. typedef GameObjectHandle<CRenderable> HRenderable;
  585. typedef GameObjectHandle<CLight> HLight;
  586. typedef GameObjectHandle<CAnimation> HAnimation;
  587. typedef GameObjectHandle<CBone> HBone;
  588. typedef GameObjectHandle<CRigidbody> HRigidbody;
  589. typedef GameObjectHandle<CCollider> HCollider;
  590. typedef GameObjectHandle<CBoxCollider> HBoxCollider;
  591. typedef GameObjectHandle<CSphereCollider> HSphereCollider;
  592. typedef GameObjectHandle<CCapsuleCollider> HCapsuleCollider;
  593. typedef GameObjectHandle<CPlaneCollider> HPlaneCollider;
  594. typedef GameObjectHandle<CJoint> HJoint;
  595. typedef GameObjectHandle<CHingeJoint> HHingeJoint;
  596. typedef GameObjectHandle<CSliderJoint> HSliderJoint;
  597. typedef GameObjectHandle<CDistanceJoint> HDistanceJoint;
  598. typedef GameObjectHandle<CSphericalJoint> HSphericalJoint;
  599. typedef GameObjectHandle<CFixedJoint> HFixedJoint;
  600. typedef GameObjectHandle<CD6Joint> HD6Joint;
  601. typedef GameObjectHandle<CCharacterController> HCharacterController;
  602. typedef GameObjectHandle<CReflectionProbe> HReflectionProbe;
  603. typedef GameObjectHandle<CSkybox> HSkybox;
  604. typedef GameObjectHandle<CLightProbeVolume> HLightProbeVolume;
  605. typedef GameObjectHandle<CAudioSource> HAudioSource;
  606. typedef GameObjectHandle<CAudioListener> HAudioListener;
  607. /** @} */
  608. }
  609. namespace bs
  610. {
  611. /**
  612. * Defers function execution until the next frame. If this function is called within another deferred call, then it will
  613. * be executed the same frame, but only after all existing deferred calls are done.
  614. *
  615. * @note
  616. * This method can be used for breaking dependencies among other things. If a class A depends on class B having
  617. * something done, but class B also depends in some way on class A, you can break up the initialization into two
  618. * separate steps, queuing the second step using this method.
  619. * @note
  620. * Similar situation can happen if you have multiple classes being initialized in an undefined order but some of them
  621. * depend on others. Using this method you can defer the dependent step until next frame, which will ensure everything
  622. * was initialized.
  623. *
  624. * @param[in] callback The callback.
  625. */
  626. void BS_CORE_EXPORT deferredCall(std::function<void()> callback);
  627. // Special types for use by profilers
  628. typedef std::basic_string<char, std::char_traits<char>, StdAlloc<char, ProfilerAlloc>> ProfilerString;
  629. template <typename T, typename A = StdAlloc<T, ProfilerAlloc>>
  630. using ProfilerVector = std::vector<T, A>;
  631. template <typename T, typename A = StdAlloc<T, ProfilerAlloc>>
  632. using ProfilerStack = std::stack<T, std::deque<T, A>>;
  633. /** Banshee thread policy that performs special startup/shutdown on threads managed by thread pool. */
  634. class BS_CORE_EXPORT ThreadBansheePolicy
  635. {
  636. public:
  637. static void onThreadStarted(const String& name)
  638. {
  639. MemStack::beginThread();
  640. }
  641. static void onThreadEnded(const String& name)
  642. {
  643. MemStack::endThread();
  644. }
  645. };
  646. #define BS_ALL_LAYERS 0xFFFFFFFFFFFFFFFF
  647. }
  648. #include "Utility/BsCommonTypes.h"