13#include <vulkan/vulkan_core.h>
160 static VkBool32
debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
161 VkDebugUtilsMessageTypeFlagsEXT messageType,
162 const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
void *pUserData);
213 Debug::Tracy::TracyVkContextManager tracyContextManager_;
266 template <
typename T>
The application context is the core class which stores the basic openxr and vulkan objects.
Owns the miniaudio engine and provides the playback API.
The physics engine manages creating and destroying physics objects for the physics simulation.
const std::unique_ptr< Core::AssetManager > & getAssetManager() const
Getter.
void calculateFrameTime(double &lastTime)
void mainLoop()
Main engine loop where the rendering and game steps happen.
std::atomic< bool > previousFrameXrComplete_
void update(double &gameTime)
World::WindField windField_
std::vector< VkCommandBuffer > commandBuffers
VkDebugUtilsMessengerEXT debugMessenger
double getGlobalTimeSeconds()
Gets the time since the beginning of the simulation (sum of all delta times)
uint32_t getRenderableSceneObjectCount() const
Counts the amount of entities which have renderable components.
void initVulkan()
Initialisation of all vulkan related resources.
Rendering::Renderer * renderer
Input::XrRig * getXrRig() const
Getter for the resolved XR rig poses.
int isMirrorViewMinimized()
Core::PhysicsEngine * physicsEngine
void createStartupScene() const
Creates the initial scene the engine loads before an actual level is loaded.
Core::AudioEngine * audioEngine_
World::WindField & getWindField()
Input::XrInputHandler * getXrInputHandler() const
Getter for the XR input handler.
const std::unique_ptr< Core::SceneManager > & getSceneManager() const
void processMirrorWindowEvents()
processes glfw window events like key presses or window events
void captureRenderdocFrame()
Captures a frame for render doc if the define RENDERDOC_ENABLED is set.
Rendering::Headset * headset
std::unique_ptr< GameModule > module
void createPhysicsWorld()
PHYSICS.
void createVulkanDebugMessenger()
void loadScene()
Triggers the load of a new scene. Will be executed once the current frame has finished processing.
const World::WindField & getWindField() const
void completeFrameAsync(VkFence graphicsFence, bool presentMirror)
Runs on background thread: waits for GPU fence, ends XR frame, presents mirror This allows CPU work t...
void initializePlogDebugger()
Rendering::MirrorView * mirrorView
Rendering::Headset * getHeadset() const
Getter for the VR headset.
void tryCreateApplicationContext()
will try to create a window and if there is no openxr runtime detected it will wait 5 seconds and try...
Core::PhysicsEngine * getPhysicsEngine() const
Getter for the pointer to the physics engine.
void createAudioEngine()
AUDIO.
void fixLoadingAssets() const
When assets have been requested but are not loaded yet the static mesh data is in a limbo where it ha...
Core::AudioEngine * getAudioEngine() const
Getter for the audio engine.
std::future< void > frameCompletionFuture_
bool descriptorDataIsDirty
std::unique_ptr< Core::SceneManager > sceneManager
double getDeltaTimeSeconds()
gets the time between frames
Input::InputManager * inputManager
Core::ApplicationContext * applicationContext
int forceSyncFramesRemaining_
Input::XrInputHandler * xrInputHandler
void populateDebugMessengerCreateInfo(VkDebugUtilsMessengerCreateInfoEXT &createInfo)
std::unique_ptr< Core::AssetManager > assetManager
Debug::UI::ImGuiManager * imguiManager_
Rendering::Renderer * getRenderer() const
Getter for the renderer.
void initRenderDoc()
Initialization point for software driven captures.
void createInputManager()
void processResourceLoadingPipelines()
Collects and processes the pipelines which have finished and dispatches the new steps....
Input::InputManager * getInputManager() const
Getter for the unified input action manager.
void cleanup()
Cleanup of pointers for vulkan and subsystems.
static VkBool32 debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData)
void run(std::unique_ptr< GameModule > module)
Runs the engine. Is the entry point for this module.
void destroyAudioEngine()
std::unique_ptr< NamedThreadPool > xrFrameThreadPool_
bool checkValidationLayerSupport()
void destroyPhysicsWorld()
PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT
void createAssetManager()
Core::ApplicationContext * getContext() const
Gets the application context which stores the vulkan instance the device and queues.
static EngineManager & getInstance()
gets a reference to the engine manager
virtual ~EngineManager()=default
Engine::EngineKern * engine
EngineKern * getEngineModule()
gets the pointer to the engine object
void setEngine(EngineKern *engineInstance)
set the content pointer for this singleton
EngineManager & operator=(const EngineManager &)=delete
EngineManager(const EngineManager &)=delete
The renderer is the main class for rendering. It owns all data which is used any time in any frame....
This is the base class for a wind field. (An area in which a vector field pushes the player glider co...