14#include <openxr/openxr.h>
16#include <vulkan/vulkan_core.h>
21#include "tracy/TracyVulkan.hpp"
55 void run(std::unique_ptr<GameModule>
module);
159 static VkBool32
debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
160 VkDebugUtilsMessageTypeFlagsEXT messageType,
161 const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
void *pUserData);
204 std::vector<TracyVkCtx> tracyVulkanContext;
265 template <
typename T>
The application context is the core class which stores the basic openxr and vulkan objects.
EngineManager & operator=(const EngineManager &)=delete
void setEngine(Engine *engineInstance)
set the content pointer for this singleton
EngineCore::Engine * getEngineModule()
gets the pointer to the engine object
virtual ~EngineManager()=default
EngineManager(const EngineManager &)=delete
static EngineManager & getInstance()
gets a reference to the engine manager
EngineCore::Engine * engine
void initVulkan()
Initialisation of all vulkan related resources.
std::shared_ptr< InputHandler > inputHandler
std::unique_ptr< AssetManager > assetManager
void populateDebugMessengerCreateInfo(VkDebugUtilsMessengerCreateInfoEXT &createInfo)
const std::unique_ptr< AssetManager > & getAssetManager() const
bool checkValidationLayerSupport()
void fixLoadingAssets() const
When assets have been requested but are not loaded yet the static mesh data is in a limbo where it ha...
int isMirrorViewMinimized()
PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT
std::future< void > frameCompletionFuture_
void loadScene()
Triggers the load of a new scene. Will be executed once the current frame has finished processing.
MeshComponent * rightHand
bool descriptorDataIsDirty
void tryCreateApplicationContext()
will try to create a window and if there is no openxr runtime detected it will wait 5 seconds and try...
void createAssetManager()
void completeFrameAsync(VkFence graphicsFence, bool presentMirror)
Runs on background thread: waits for GPU fence, ends XR frame, presents mirror This allows CPU work t...
std::atomic< bool > previousFrameXrComplete_
std::vector< VkCommandBuffer > commandBuffers
static VkBool32 debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData)
void cleanup()
Cleanup of pointers for vulkan and subsystems.
VkDebugUtilsMessengerEXT debugMessenger
Renderer * getRenderer() const
Getter for the renderer.
const std::unique_ptr< SceneManager > & getSceneManager() const
void createPhysicsWorld()
PHYSICS.
void calculateFrameTime(double &lastTime)
double getGlobalTimeSeconds()
Gets the time since the beginning of the simulation (sum of all delta times)
void update(double &gameTime)
void mainLoop()
Main engine loop where the rendering and game steps happen.
ApplicationContext * getContext() const
Gets the application context which stores the vulkan instance the device and queues.
ApplicationContext * applicationContext
PhysicsEngine * physicsEngine
std::unique_ptr< SceneManager > sceneManager
double getDeltaTimeSeconds()
gets the time between frames
void processResourceLoadingPipelines()
Collects and processes the pipelines which have finished and dispatches the new steps....
Input::XrInputHandler * xrInputHandler
void processMirrorWindowEvents()
processes glfw window events like key presses or window events
PhysicsEngine * getPhysicsEngine() const
Getter for the pointer to the physics engine.
void createInputManager()
void initializePlogDebugger()
uint32_t getRenderableSceneObjectCount() const
Counts the amount of entities which have renderable components.
std::unique_ptr< GameModule > module
void captureRenderdocFrame()
Captures a frame for render doc if the define RENDERDOC_ENABLED is set.
void run(std::unique_ptr< GameModule > module)
Runs the engine. Is the entry point for this module.
Input::XrInputHandler * getXrInputHandler() const
Getter for the XR input handler.
void createVulkanDebugMessenger()
void initRenderDoc()
Initialization point for software driven captures.
void createStartupScene()
Creates the initial scene the engine loads before an actual level is loaded.
Headset * getHeadset() const
Getter for the VR headset.
std::shared_ptr< InputHandler > getInputHandler()
Gets a shared handle to the input handler. This is used for any type of input.
void destroyPhysicsWorld()
std::unique_ptr< NamedThreadPool > xrFrameThreadPool_
A component which can be attached as many times to an actor as one wants. It makes it possible to ren...
This class houses the components needed to display a vr image on the desktop.
The physics engine manages creating and destroying physics objects for the physics simulation.
The render process class consolidates all the resources that needs to be duplicated for each frame th...
Log category system implementation.