Lysa  0.0
Lysa 3D Engine
Context Struct Reference

Detailed Description

Lysa instance-wide runtime context.

Public Member Functions

 Context (const ContextConfiguration &config)
 

Public Attributes

bool exit {false}
 
const ContextConfiguration config
 
const std::shared_ptr< vireo::Vireo > vireo
 
const VirtualFS fs
 
EventManager events
 
DeferredTasksBuffer defer
 
AsyncTasksPool threads
 
ResourcesRegistry res
 
Tweens tweens
 
Timers timers
 
Samplers samplers
 
const std::shared_ptr< vireo::SubmitQueue > graphicQueue
 
const std::shared_ptr< vireo::SubmitQueue > transferQueue
 
AsyncQueue asyncQueue
 
std::shared_ptr< vireo::DescriptorLayout > globalDescriptorLayout [2]
 
std::shared_ptr< vireo::DescriptorSet > globalDescriptorSet [2]
 
uint32 fps {0}
 

Static Public Attributes

static std::unique_ptr< Context > ctx
 Global runtime context (events, resources, etc.). More...
 

Constructor & Destructor Documentation

Context ( const ContextConfiguration config)

Initializes all engine subsystems using the given configuration.

Parameters
configGlobal configuration (graphics backend, physics, VFS, etc.).

Member Data Documentation

AsyncQueue asyncQueue

Asynchronous submissions of transfer commands

const ContextConfiguration config

Global context configuration

std::unique_ptr<Context> ctx
static

Global runtime context (events, resources, etc.).

Deferred commands buffer

EventManager events

Central event dispatcher for the application.

bool exit {false}

Flag controlling the main loop termination.

When set to true, the main loop (see Lysa::run) will exit at the end of the current iteration.

uint32 fps {0}

Calculated average FPS (for information only, not to measure performance)

const VirtualFS fs

Read and write resources referenced by URI

std::shared_ptr<vireo::DescriptorLayout> globalDescriptorLayout[2]

Global descriptor set layout for GPU-ready shared resources.

std::shared_ptr<vireo::DescriptorSet> globalDescriptorSet[2]

Global descriptor set layout for GPU-ready shared resources.

const std::shared_ptr<vireo::SubmitQueue> graphicQueue

Submit queue used for graphics/rendering work.

Resource resolution and access facility.

Samplers samplers

Global GPU samplers

AsyncTasksPool threads

Deferred commands buffer

Timers timers

Timers automatically updated each physics tick by the engine

const std::shared_ptr<vireo::SubmitQueue> transferQueue

Submit queue used for DMA transfers work.

Tweens tweens

Tweens automaticaly updated each physics tick by the engine

const std::shared_ptr<vireo::Vireo> vireo

Backend object owning the device/instance and factory for GPU resources.