Plasma Engine  2.0
Loading...
Searching...
No Matches
JoltCore.h
1#pragma once
2
3#include <Foundation/Memory/CommonAllocators.h>
4#include <Foundation/Types/UniquePtr.h>
5#include <JoltPlugin/JoltPluginDLL.h>
6
9class plJoltDebugRenderer;
10class plWorld;
11
12namespace JPH
13{
14 class JobSystem;
15}
16
17class PL_JOLTPLUGIN_DLL plJoltCore
18{
19public:
20 static JPH::JobSystem* GetJoltJobSystem() { return s_pJobSystem.get(); }
21 static const plJoltMaterial* GetDefaultMaterial() { return s_pDefaultMaterial; }
22
23 static void DebugDraw(plWorld* pWorld);
24
25#ifdef JPH_DEBUG_RENDERER
26 static std::unique_ptr<plJoltDebugRenderer> s_pDebugRenderer;
27#endif
28
29private:
30 PL_MAKE_SUBSYSTEM_STARTUP_FRIEND(Jolt, JoltPlugin);
31
32 static void Startup();
33 static void Shutdown();
34
35 static void SurfaceResourceEventHandler(const plSurfaceResourceEvent& e);
36
37 static void* JoltMalloc(size_t inSize);
38 static void JoltFree(void* inBlock);
39 static void* JoltAlignedMalloc(size_t inSize, size_t inAlignment);
40 static void JoltAlignedFree(void* inBlock);
41
42 static plJoltMaterial* s_pDefaultMaterial;
43 static std::unique_ptr<JPH::JobSystem> s_pJobSystem;
44
45 static plUniquePtr<plProxyAllocator> s_pAllocator;
46};
Definition JoltCore.h:18
Definition JoltMaterial.h:7
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
Definition SurfaceResource.h:15