BsCorePrerequisites.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "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 "BsHString.h"
  165. namespace bs
  166. {
  167. static const StringID RenderAPIAny = "AnyRenderAPI";
  168. static const StringID RendererAny = "AnyRenderer";
  169. class Color;
  170. class GpuProgram;
  171. class GpuProgramManager;
  172. class IndexBuffer;
  173. class VertexBuffer;
  174. class GpuBuffer;
  175. class GpuProgramManager;
  176. class GpuProgramFactory;
  177. class IndexData;
  178. class Pass;
  179. class Technique;
  180. class Shader;
  181. class Material;
  182. class RenderAPICapabilities;
  183. class RenderTarget;
  184. class RenderTexture;
  185. class RenderWindow;
  186. class RenderTargetProperties;
  187. class SamplerState;
  188. class TextureManager;
  189. class Viewport;
  190. class VertexDeclaration;
  191. class Input;
  192. struct PointerEvent;
  193. class RawInputHandler;
  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 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. // Asset import
  301. class SpecificImporter;
  302. class Importer;
  303. // Resources
  304. class Resource;
  305. class Resources;
  306. class ResourceManifest;
  307. class Texture;
  308. class Mesh;
  309. class MeshBase;
  310. class TransientMesh;
  311. class MeshHeap;
  312. class Font;
  313. class ResourceMetaData;
  314. class OSDropTarget;
  315. class StringTable;
  316. class PhysicsMaterial;
  317. class PhysicsMesh;
  318. class AudioClip;
  319. class CoreObjectManager;
  320. struct CollisionData;
  321. // Scene
  322. class SceneObject;
  323. class Component;
  324. class SceneManager;
  325. // RTTI
  326. class MeshRTTI;
  327. // Desc structs
  328. struct SAMPLER_STATE_DESC;
  329. struct DEPTH_STENCIL_STATE_DESC;
  330. struct RASTERIZER_STATE_DESC;
  331. struct BLEND_STATE_DESC;
  332. struct RENDER_TARGET_BLEND_STATE_DESC;
  333. struct RENDER_TEXTURE_DESC;
  334. struct RENDER_WINDOW_DESC;
  335. struct FONT_DESC;
  336. struct CHAR_CONTROLLER_DESC;
  337. struct JOINT_DESC;
  338. struct FIXED_JOINT_DESC;
  339. struct DISTANCE_JOINT_DESC;
  340. struct HINGE_JOINT_DESC;
  341. struct SLIDER_JOINT_DESC;
  342. struct SPHERICAL_JOINT_DESC;
  343. struct D6_JOINT_DESC;
  344. struct AUDIO_CLIP_DESC;
  345. template<class T>
  346. class TCoreThreadQueue;
  347. class CommandQueueNoSync;
  348. class CommandQueueSync;
  349. namespace ct
  350. {
  351. class Renderer;
  352. class VertexData;
  353. class SamplerState;
  354. class IndexBuffer;
  355. class VertexBuffer;
  356. class RenderAPI;
  357. class RenderTarget;
  358. class RenderTexture;
  359. class RenderWindow;
  360. class DepthStencilState;
  361. class RasterizerState;
  362. class BlendState;
  363. class CoreObject;
  364. class Camera;
  365. class Renderable;
  366. class MeshBase;
  367. class Mesh;
  368. class TransientMesh;
  369. class Texture;
  370. class MeshHeap;
  371. class VertexDeclaration;
  372. class GpuBuffer;
  373. class GpuParamBlockBuffer;
  374. class GpuParams;
  375. class Shader;
  376. class Viewport;
  377. class Pass;
  378. class GpuParamsSet;
  379. class Technique;
  380. class Material;
  381. class GpuProgram;
  382. class Light;
  383. class ComputePipelineState;
  384. class GraphicsPipelineState;
  385. class Camera;
  386. class GpuParamsSet;
  387. class MaterialParams;
  388. class GpuPipelineParamInfo;
  389. class CommandBuffer;
  390. class EventQuery;
  391. class TimerQuery;
  392. class OcclusionQuery;
  393. class TextureView;
  394. class RenderableElement;
  395. class RenderWindowManager;
  396. class RenderStateManager;
  397. class HardwareBufferManager;
  398. class ReflectionProbe;
  399. class Skybox;
  400. }
  401. }
  402. /************************************************************************/
  403. /* Typedefs */
  404. /************************************************************************/
  405. namespace bs
  406. {
  407. typedef TCoreThreadQueue<CommandQueueNoSync> CoreThreadQueue;
  408. }
  409. /************************************************************************/
  410. /* RTTI */
  411. /************************************************************************/
  412. namespace bs
  413. {
  414. enum TypeID_Core
  415. {
  416. TID_Texture = 1001,
  417. TID_Mesh = 1002,
  418. TID_MeshData = 1003,
  419. TID_VertexDeclaration = 1004,
  420. TID_VertexElementData = 1005,
  421. TID_Component = 1006,
  422. TID_ResourceHandle = 1009,
  423. TID_GpuProgram = 1010,
  424. TID_ResourceHandleData = 1011,
  425. TID_CgProgram = 1012,
  426. TID_Pass = 1014,
  427. TID_Technique = 1015,
  428. TID_Shader = 1016,
  429. TID_Material = 1017,
  430. TID_SamplerState = 1021,
  431. TID_BlendState = 1023,
  432. TID_RasterizerState = 1024,
  433. TID_DepthStencilState = 1025,
  434. TID_BLEND_STATE_DESC = 1034,
  435. TID_SHADER_DATA_PARAM_DESC = 1035,
  436. TID_SHADER_OBJECT_PARAM_DESC = 1036,
  437. TID_SHADER_PARAM_BLOCK_DESC = 1047,
  438. TID_ImportOptions = 1048,
  439. TID_Font = 1051,
  440. TID_FONT_DESC = 1052,
  441. TID_CHAR_DESC = 1053,
  442. TID_FontImportOptions = 1056,
  443. TID_FontBitmap = 1057,
  444. TID_SceneObject = 1059,
  445. TID_GameObject = 1060,
  446. TID_PixelData = 1062,
  447. TID_GpuResourceData = 1063,
  448. TID_VertexDataDesc = 1064,
  449. TID_MeshBase = 1065,
  450. TID_GameObjectHandleBase = 1066,
  451. TID_ResourceManifest = 1067,
  452. TID_ResourceManifestEntry = 1068,
  453. TID_EmulatedParamBlock = 1069,
  454. TID_TextureImportOptions = 1070,
  455. TID_ResourceMetaData = 1071,
  456. TID_ShaderInclude = 1072,
  457. TID_Viewport = 1073,
  458. TID_ResourceDependencies = 1074,
  459. TID_ShaderMetaData = 1075,
  460. TID_MeshImportOptions = 1076,
  461. TID_Prefab = 1077,
  462. TID_PrefabDiff = 1078,
  463. TID_PrefabObjectDiff = 1079,
  464. TID_PrefabComponentDiff = 1080,
  465. TID_CGUIWidget = 1081,
  466. TID_ProfilerOverlay = 1082,
  467. TID_StringTable = 1083,
  468. TID_LanguageData = 1084,
  469. TID_LocalizedStringData = 1085,
  470. TID_MaterialParamColor = 1086,
  471. TID_WeakResourceHandle = 1087,
  472. TID_TextureParamData = 1088,
  473. TID_StructParamData = 1089,
  474. TID_MaterialParams = 1090,
  475. TID_MaterialRTTIParam = 1091,
  476. TID_PhysicsMaterial = 1092,
  477. TID_CCollider = 1093,
  478. TID_CBoxCollider = 1094,
  479. TID_CSphereCollider = 1095,
  480. TID_CCapsuleCollider = 1096,
  481. TID_CPlaneCollider = 1097,
  482. TID_CRigidbody = 1098,
  483. TID_PhysicsMesh = 1099,
  484. TID_CMeshCollider = 1100,
  485. TID_CJoint = 1101,
  486. TID_CFixedJoint = 1102,
  487. TID_CDistanceJoint = 1103,
  488. TID_CHingeJoint = 1104,
  489. TID_CSphericalJoint = 1105,
  490. TID_CSliderJoint = 1106,
  491. TID_CD6Joint = 1107,
  492. TID_CCharacterController = 1108,
  493. TID_FPhysicsMesh = 1109,
  494. TID_ShaderImportOptions = 1110,
  495. TID_AudioClip = 1111,
  496. TID_AudioClipImportOptions = 1112,
  497. TID_CAudioListener = 1113,
  498. TID_CAudioSource = 1114,
  499. TID_AnimationClip = 1115,
  500. TID_AnimationCurve = 1116,
  501. TID_KeyFrame = 1117,
  502. TID_NamedAnimationCurve = 1118,
  503. TID_Skeleton = 1119,
  504. TID_SkeletonBoneInfo = 1120,
  505. TID_AnimationSplitInfo = 1121,
  506. TID_CAnimation = 1122,
  507. TID_AnimationEvent = 1123,
  508. TID_ImportedAnimationEvents = 1124,
  509. TID_CBone = 1125,
  510. TID_MaterialParamData = 1126,
  511. TID_PostProcessSettings = 1127,
  512. TID_MorphShape = 1128,
  513. TID_MorphShapes = 1129,
  514. TID_MorphChannel = 1130,
  515. TID_ReflectionProbe = 1131,
  516. TID_CReflectionProbe = 1132,
  517. TID_CachedTextureData = 1133,
  518. TID_Skybox = 1134,
  519. TID_CSkybox = 1135,
  520. // Moved from Engine layer
  521. TID_CCamera = 30000,
  522. TID_Camera = 30003,
  523. TID_CRenderable = 30001,
  524. TID_Renderable = 30004,
  525. TID_Light = 30011,
  526. TID_CLight = 30012,
  527. };
  528. }
  529. /************************************************************************/
  530. /* Resource references */
  531. /************************************************************************/
  532. #include "BsResourceHandle.h"
  533. namespace bs
  534. {
  535. /** @addtogroup Resources
  536. * @{
  537. */
  538. typedef ResourceHandle<Resource> HResource;
  539. typedef ResourceHandle<Texture> HTexture;
  540. typedef ResourceHandle<Mesh> HMesh;
  541. typedef ResourceHandle<Material> HMaterial;
  542. typedef ResourceHandle<ShaderInclude> HShaderInclude;
  543. typedef ResourceHandle<Font> HFont;
  544. typedef ResourceHandle<Shader> HShader;
  545. typedef ResourceHandle<Prefab> HPrefab;
  546. typedef ResourceHandle<StringTable> HStringTable;
  547. typedef ResourceHandle<PhysicsMaterial> HPhysicsMaterial;
  548. typedef ResourceHandle<PhysicsMesh> HPhysicsMesh;
  549. typedef ResourceHandle<AudioClip> HAudioClip;
  550. typedef ResourceHandle<AnimationClip> HAnimationClip;
  551. /** @} */
  552. }
  553. #include "BsGameObjectHandle.h"
  554. namespace bs
  555. {
  556. /** @addtogroup Scene
  557. * @{
  558. */
  559. // Game object handles
  560. typedef GameObjectHandle<GameObject> HGameObject;
  561. typedef GameObjectHandle<SceneObject> HSceneObject;
  562. typedef GameObjectHandle<Component> HComponent;
  563. typedef GameObjectHandle<CCamera> HCamera;
  564. typedef GameObjectHandle<CRenderable> HRenderable;
  565. typedef GameObjectHandle<CLight> HLight;
  566. typedef GameObjectHandle<CAnimation> HAnimation;
  567. typedef GameObjectHandle<CBone> HBone;
  568. typedef GameObjectHandle<CRigidbody> HRigidbody;
  569. typedef GameObjectHandle<CCollider> HCollider;
  570. typedef GameObjectHandle<CBoxCollider> HBoxCollider;
  571. typedef GameObjectHandle<CSphereCollider> HSphereCollider;
  572. typedef GameObjectHandle<CCapsuleCollider> HCapsuleCollider;
  573. typedef GameObjectHandle<CPlaneCollider> HPlaneCollider;
  574. typedef GameObjectHandle<CJoint> HJoint;
  575. typedef GameObjectHandle<CHingeJoint> HHingeJoint;
  576. typedef GameObjectHandle<CSliderJoint> HSliderJoint;
  577. typedef GameObjectHandle<CDistanceJoint> HDistanceJoint;
  578. typedef GameObjectHandle<CSphericalJoint> HSphericalJoint;
  579. typedef GameObjectHandle<CFixedJoint> HFixedJoint;
  580. typedef GameObjectHandle<CD6Joint> HD6Joint;
  581. typedef GameObjectHandle<CCharacterController> HCharacterController;
  582. typedef GameObjectHandle<CReflectionProbe> HReflectionProbe;
  583. typedef GameObjectHandle<CSkybox> HSkybox;
  584. /** @} */
  585. }
  586. namespace bs
  587. {
  588. /**
  589. * Defers function execution until the next frame. If this function is called within another deferred call, then it will
  590. * be executed the same frame, but only after all existing deferred calls are done.
  591. *
  592. * @note
  593. * This method can be used for breaking dependencies among other things. If a class A depends on class B having
  594. * something done, but class B also depends in some way on class A, you can break up the initialization into two
  595. * separate steps, queuing the second step using this method.
  596. * @note
  597. * Similar situation can happen if you have multiple classes being initialized in an undefined order but some of them
  598. * depend on others. Using this method you can defer the dependent step until next frame, which will ensure everything
  599. * was initialized.
  600. *
  601. * @param[in] callback The callback.
  602. */
  603. void BS_CORE_EXPORT deferredCall(std::function<void()> callback);
  604. // Special types for use by profilers
  605. typedef std::basic_string<char, std::char_traits<char>, StdAlloc<char, ProfilerAlloc>> ProfilerString;
  606. template <typename T, typename A = StdAlloc<T, ProfilerAlloc>>
  607. using ProfilerVector = std::vector<T, A>;
  608. template <typename T, typename A = StdAlloc<T, ProfilerAlloc>>
  609. using ProfilerStack = std::stack<T, std::deque<T, A>>;
  610. /** Banshee thread policy that performs special startup/shutdown on threads managed by thread pool. */
  611. class BS_CORE_EXPORT ThreadBansheePolicy
  612. {
  613. public:
  614. static void onThreadStarted(const String& name)
  615. {
  616. MemStack::beginThread();
  617. }
  618. static void onThreadEnded(const String& name)
  619. {
  620. MemStack::endThread();
  621. }
  622. };
  623. #define BS_ALL_LAYERS 0xFFFFFFFFFFFFFFFF
  624. }
  625. #include "BsCommonTypes.h"