#include <Engine.h>
|
| static VkBool32 | debugCallback (VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData) |
Definition at line 38 of file Engine.h.
◆ EngineKern()
| Engine::EngineKern::EngineKern |
( |
| ) |
|
|
default |
◆ ~EngineKern()
| Engine::EngineKern::~EngineKern |
( |
| ) |
|
◆ calculateFrameTime()
| void Engine::EngineKern::calculateFrameTime |
( |
double & | lastTime | ) |
|
|
private |
◆ captureRenderdocFrame()
| void Engine::EngineKern::captureRenderdocFrame |
( |
| ) |
|
|
private |
Captures a frame for render doc if the define RENDERDOC_ENABLED is set.
◆ checkValidationLayerSupport()
| bool Engine::EngineKern::checkValidationLayerSupport |
( |
| ) |
|
|
private |
◆ cleanup()
| void Engine::EngineKern::cleanup |
( |
| ) |
|
|
private |
Cleanup of pointers for vulkan and subsystems.
◆ completeFrameAsync()
| void Engine::EngineKern::completeFrameAsync |
( |
VkFence | graphicsFence, |
|
|
bool | presentMirror ) |
|
private |
Runs on background thread: waits for GPU fence, ends XR frame, presents mirror This allows CPU work to overlap with GPU execution of the previous frame.
- Parameters
-
| graphicsFence | The fence to wait on (from the frame that was just submitted) |
| presentMirror | Whether to present the mirror view after xrEndFrame |
◆ createAssetManager()
| void Engine::EngineKern::createAssetManager |
( |
| ) |
|
|
private |
◆ createAudioEngine()
| void Engine::EngineKern::createAudioEngine |
( |
| ) |
|
|
private |
◆ createInputManager()
| void Engine::EngineKern::createInputManager |
( |
| ) |
|
|
private |
◆ createPhysicsWorld()
| void Engine::EngineKern::createPhysicsWorld |
( |
| ) |
|
|
private |
◆ createStartupScene()
| void Engine::EngineKern::createStartupScene |
( |
| ) |
const |
|
private |
Creates the initial scene the engine loads before an actual level is loaded.
◆ createVulkanDebugMessenger()
| void Engine::EngineKern::createVulkanDebugMessenger |
( |
| ) |
|
|
private |
◆ debugCallback()
| VkBool32 Engine::EngineKern::debugCallback |
( |
VkDebugUtilsMessageSeverityFlagBitsEXT | messageSeverity, |
|
|
VkDebugUtilsMessageTypeFlagsEXT | messageType, |
|
|
const VkDebugUtilsMessengerCallbackDataEXT * | pCallbackData, |
|
|
void * | pUserData ) |
|
staticprivate |
◆ destroyAudioEngine()
| void Engine::EngineKern::destroyAudioEngine |
( |
| ) |
|
|
private |
◆ destroyPhysicsWorld()
| void Engine::EngineKern::destroyPhysicsWorld |
( |
| ) |
|
|
private |
◆ fixLoadingAssets()
| void Engine::EngineKern::fixLoadingAssets |
( |
| ) |
const |
|
private |
When assets have been requested but are not loaded yet the static mesh data is in a limbo where it has no asset yet but a path. This function fixes this issue by checking each frame if the asset is loaded already and if it is it sets it.
◆ getAssetManager()
| const std::unique_ptr< Core::AssetManager > & Engine::EngineKern::getAssetManager |
( |
| ) |
const |
◆ getAudioEngine()
Getter for the audio engine.
- Returns
- pointer to the audio engine, or nullptr if not initialized
Definition at line 281 of file Engine.h.
References audioEngine_.
◆ getContext()
Gets the application context which stores the vulkan instance the device and queues.
- Returns
- the context object
Definition at line 78 of file Engine.h.
References applicationContext.
◆ getDeltaTimeSeconds()
| double Engine::EngineKern::getDeltaTimeSeconds |
( |
| ) |
|
gets the time between frames
- Returns
- time in seconds
◆ getGlobalTimeSeconds()
| double Engine::EngineKern::getGlobalTimeSeconds |
( |
| ) |
|
Gets the time since the beginning of the simulation (sum of all delta times)
- Returns
- time since the beginning of simulation
◆ getHeadset()
Getter for the VR headset.
- Returns
- pointer to the headset
Definition at line 131 of file Engine.h.
References headset.
◆ getInputManager()
Getter for the unified input action manager.
- Returns
- pointer to the input manager
Definition at line 119 of file Engine.h.
References inputManager.
◆ getPhysicsEngine()
Getter for the pointer to the physics engine.
- Returns
- pointer to the physics engine
Definition at line 275 of file Engine.h.
References physicsEngine.
◆ getRenderableSceneObjectCount()
| uint32_t Engine::EngineKern::getRenderableSceneObjectCount |
( |
| ) |
const |
|
nodiscard |
Counts the amount of entities which have renderable components.
- Returns
- amount of entities which fit the description of a renderable object
◆ getRenderer()
Getter for the renderer.
- Returns
- pointer to the renderer
◆ getSceneManager()
| const std::unique_ptr< Core::SceneManager > & Engine::EngineKern::getSceneManager |
( |
| ) |
const |
|
inline |
◆ getWindField() [1/2]
◆ getWindField() [2/2]
◆ getXrInputHandler()
Getter for the XR input handler.
- Returns
- pointer to the XR input handler
Definition at line 113 of file Engine.h.
References xrInputHandler.
◆ getXrRig()
Getter for the resolved XR rig poses.
- Returns
- pointer to the XR rig
Definition at line 125 of file Engine.h.
References xrRig.
◆ initAssets()
| void Engine::EngineKern::initAssets |
( |
| ) |
|
|
private |
◆ initializePlogDebugger()
| void Engine::EngineKern::initializePlogDebugger |
( |
| ) |
|
|
private |
◆ initRenderDoc()
| void Engine::EngineKern::initRenderDoc |
( |
| ) |
|
Initialization point for software driven captures.
◆ initStartupScene()
| void Engine::EngineKern::initStartupScene |
( |
| ) |
|
|
private |
◆ initVulkan()
| void Engine::EngineKern::initVulkan |
( |
| ) |
|
|
private |
Initialisation of all vulkan related resources.
◆ initWindow()
| void Engine::EngineKern::initWindow |
( |
| ) |
|
|
private |
◆ isMirrorViewMinimized()
| int Engine::EngineKern::isMirrorViewMinimized |
( |
| ) |
|
|
private |
◆ loadScene()
template<typename T>
| void Engine::EngineKern::loadScene |
( |
| ) |
|
|
inline |
Triggers the load of a new scene. Will be executed once the current frame has finished processing.
- Template Parameters
-
| T | Type of the scene to load. Has to be child of EngineCore::Scene |
Definition at line 267 of file Engine.h.
References sceneManager.
◆ mainLoop()
| void Engine::EngineKern::mainLoop |
( |
| ) |
|
|
private |
Main engine loop where the rendering and game steps happen.
◆ populateDebugMessengerCreateInfo()
| void Engine::EngineKern::populateDebugMessengerCreateInfo |
( |
VkDebugUtilsMessengerCreateInfoEXT & | createInfo | ) |
|
|
private |
◆ processMirrorWindowEvents()
| void Engine::EngineKern::processMirrorWindowEvents |
( |
| ) |
|
processes glfw window events like key presses or window events
◆ processResourceLoadingPipelines()
| void Engine::EngineKern::processResourceLoadingPipelines |
( |
| ) |
|
|
private |
Collects and processes the pipelines which have finished and dispatches the new steps. Asset loading.
◆ run()
| void Engine::EngineKern::run |
( |
std::unique_ptr< GameModule > | module | ) |
|
Runs the engine. Is the entry point for this module.
References module.
◆ tryCreateApplicationContext()
| void Engine::EngineKern::tryCreateApplicationContext |
( |
| ) |
|
|
private |
will try to create a window and if there is no openxr runtime detected it will wait 5 seconds and try to find one again
◆ update()
| void Engine::EngineKern::update |
( |
double & | gameTime | ) |
|
|
private |
◆ applicationContext
◆ assetManager
◆ audioEngine_
◆ commandBuffers
| std::vector<VkCommandBuffer> Engine::EngineKern::commandBuffers |
|
private |
◆ currentFrame
| uint32_t Engine::EngineKern::currentFrame = 0 |
|
private |
◆ debugMessenger
| VkDebugUtilsMessengerEXT Engine::EngineKern::debugMessenger = nullptr |
|
private |
◆ deltaTimeSeconds
| double Engine::EngineKern::deltaTimeSeconds |
|
private |
◆ descriptorDataIsDirty
| bool Engine::EngineKern::descriptorDataIsDirty = false |
|
private |
◆ forceSyncFramesRemaining_
| int Engine::EngineKern::forceSyncFramesRemaining_ = 0 |
|
private |
◆ frameCompletionFuture_
| std::future<void> Engine::EngineKern::frameCompletionFuture_ |
|
private |
◆ frameCounter
| uint64_t Engine::EngineKern::frameCounter = 0 |
|
private |
◆ gameTime
| double Engine::EngineKern::gameTime = 0.0f |
|
private |
◆ headset
◆ imguiManager_
| Debug::UI::ImGuiManager* Engine::EngineKern::imguiManager_ = nullptr |
|
private |
◆ inputManager
◆ isXrSessionRunning
| bool Engine::EngineKern::isXrSessionRunning = false |
|
private |
◆ meshCount
| uint32_t Engine::EngineKern::meshCount = 0 |
|
private |
◆ mirrorView
| Rendering::MirrorView* Engine::EngineKern::mirrorView = nullptr |
|
private |
◆ module
| std::unique_ptr<GameModule> Engine::EngineKern::module |
|
private |
◆ physicsEngine
◆ previousFrameXrComplete_
| std::atomic<bool> Engine::EngineKern::previousFrameXrComplete_ {true} |
|
private |
◆ renderer
◆ sceneManager
◆ textureCount
| uint32_t Engine::EngineKern::textureCount = 0 |
|
private |
◆ vkDestroyDebugUtilsMessengerEXT
| PFN_vkDestroyDebugUtilsMessengerEXT Engine::EngineKern::vkDestroyDebugUtilsMessengerEXT = nullptr |
|
private |
◆ windField_
◆ xrFrameThreadPool_
◆ xrInputHandler
◆ xrRig
The documentation for this class was generated from the following file:
- /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Core/Engine.h