VulkanApplication is inherited by all samples. The common platform code will run the main loop and take care of application lifecycle.
More...
#include <application.hpp>
VulkanApplication is inherited by all samples. The common platform code will run the main loop and take care of application lifecycle.
Definition at line 33 of file application.hpp.
◆ initialize()
virtual bool MaliSDK::VulkanApplication::initialize |
( |
Context * |
pContext | ) |
|
|
pure virtual |
This function is called when the context is brought up and is the constructor of this class.
- Parameters
-
pContext | The Vulkan context |
- Returns
- true if initialization succeeded. If initialization fails, the application will terminate.
◆ render()
virtual void MaliSDK::VulkanApplication::render |
( |
unsigned |
swapchainIndex, |
|
|
float |
deltaTime |
|
) |
| |
|
pure virtual |
Render a frame.
- Parameters
-
swapchainIndex | The swapchain index to render into, previously obtained by backbuffers parameter in updateSwapchain. |
deltaTime | The time in seconds since last call to render. |
◆ terminate()
virtual void MaliSDK::VulkanApplication::terminate |
( |
| ) |
|
|
pure virtual |
Destructor for the class.
After this call returns, initialize can be called again.
◆ updateSwapchain()
virtual void MaliSDK::VulkanApplication::updateSwapchain |
( |
const std::vector< VkImage > & |
backbuffers, |
|
|
const Platform::SwapchainDimensions & |
dimensions |
|
) |
| |
|
pure virtual |
Called when the swapchain has been initialized.
updateSwapchain is always called after the first initialize.
If the swapchain for some reason is lost or recreated, this can be called several times during the lifetime of the application.
- Parameters
-
backbuffers | A vector containing all the backbuffers in the current swapchain |
dimensions | The dimensions of the swapchain, along with the VkFormat needed to create render passes |
The documentation for this class was generated from the following file: