|
SPARK
0.1.0
A general purpose game engine written in C++.
|
Vulkan implementation of IRenderBackend. More...
#include <VulkanBackend.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| VulkanBackend (std::span< std::string > extensions={}, std::span< std::string > validation_layers={}) | |
| Initializes a VulkanBackend. | |
| VulkanBackend (const VulkanBackend &other)=delete | |
| VulkanBackend (VulkanBackend &&other) noexcept=delete | |
| VulkanBackend & | operator= (const VulkanBackend &other)=delete |
| VulkanBackend & | operator= (VulkanBackend &&other) noexcept=delete |
| std::unique_ptr< VulkanSurface > | createSurface (const std::function< VkSurfaceKHR(const VkInstance &)> &predicate) const |
Creates a surface using the predicate callback. | |
| std::span< std::string > | enabledValidationLayers () const noexcept |
| Gets the list of enabled validation layers. | |
| std::vector< const VulkanGraphicsAdapter * > | adapters () const noexcept override |
| Lists all available graphics adapters. | |
| const VulkanGraphicsAdapter * | findAdapter (const std::optional< lib::Uuid > &id) const override |
| Finds a graphics adapter by unique id. | |
| VulkanDevice * | device (const std::string &name) noexcept override |
| Searches for a graphics device by name. | |
| const VulkanDevice * | device (const std::string &name) const noexcept override |
| Searches for a graphics device by name. | |
| void | registerDevice (std::string name, std::unique_ptr< VulkanDevice > &&device) override |
| Registers a new graphics device. | |
| void | releaseDevice (const std::string &name) override |
| Unregisters a graphics device. | |
Public Member Functions inherited from spark::render::RenderBackend< VulkanDevice > | |
| virtual void | registerDevice (std::string name, std::unique_ptr< device_type > &&device)=0 |
| Registers a new graphics device. | |
| device_type * | createDevice (std::string name, const adapter_type &adapter, std::unique_ptr< surface_type > &&surface, Args &&... args) |
| Creates a new graphics device. | |
Public Member Functions inherited from spark::render::IRenderBackend | |
| BackendType | type () const noexcept override |
| Gets the type of the backend. | |
| std::vector< const IGraphicsAdapter * > | adapters () const noexcept |
| Lists all available graphics adapters. | |
Public Member Functions inherited from spark::render::Resource< VkInstance > | |
| Resource (VkInstance handle) noexcept | |
| Initializes the managed resource with the given handle. | |
| Resource (const Resource &other)=delete | |
| Resource (Resource &&other) noexcept=delete | |
| Resource & | operator= (const Resource &other)=delete |
| Resource & | operator= (Resource &&other) noexcept=delete |
| const VkInstance & | handle () const final |
| Gets the managed resource handle. | |
Static Public Member Functions | |
| static bool | ValidateInstanceLayers (std::span< std::string > validation_layers) noexcept |
Checks if all elements of validation_layers are contained by the a list of available validation layers. | |
| static std::vector< std::string > | InstanceValidationLayers () noexcept |
| Gets all available validation layers. | |
| static bool | ValidateInstanceExtensions (std::span< std::string > extensions) noexcept |
Checks if all elements of extensions are contained by the a list of available extensions. | |
| static std::vector< std::string > | AvailableInstanceExtensions () noexcept |
| Gets all available instance extensions. | |
Additional Inherited Members | |
Public Types inherited from spark::render::RenderBackend< VulkanDevice > | |
| using | device_type |
| using | surface_type |
| using | adapter_type |
| using | swap_chain_type |
| using | command_queue_type |
| using | command_buffer_type |
| using | frame_buffer_type |
| using | render_pass_type |
| using | pipeline_layout_type |
| using | render_pipeline_type |
| using | shader_program_type |
| using | input_assembler_type |
| using | rasterizer_type |
Public Types inherited from spark::render::IResource< VkInstance > | |
| using | handle_type |
Protected Member Functions inherited from spark::render::Resource< VkInstance > | |
| VkInstance & | handle () final |
| Gets the managed resource handle. | |
Vulkan implementation of IRenderBackend.
|
explicit |
Initializes a VulkanBackend.
| extensions | The instance extensions to enable on the backend. |
| validation_layers | The validation layers to enable on the backend. |
|
nodiscardoverridevirtualnoexcept |
Lists all available graphics adapters.
Implements spark::render::RenderBackend< VulkanDevice >.
|
staticnoexcept |
Gets all available instance extensions.
|
nodiscard |
Creates a surface using the predicate callback.
| predicate | A callback that gets called with the backend instance handle and creates the surface instance. |
|
nodiscardoverridevirtualnoexcept |
Searches for a graphics device by name.
| name | The name of the graphics device to find. |
nullptr otherwise. Implements spark::render::RenderBackend< VulkanDevice >.
|
nodiscardoverridevirtualnoexcept |
Searches for a graphics device by name.
| name | The name of the graphics device to find. |
nullptr otherwise. Implements spark::render::RenderBackend< VulkanDevice >.
|
noexcept |
Gets the list of enabled validation layers.
|
nodiscardoverridevirtual |
Finds a graphics adapter by unique id.
| id | The unique id of the graphics adapter to find. If std::nullopt, the returned adapter is implementation-defined. |
nullptr otherwise. Implements spark::render::RenderBackend< VulkanDevice >.
|
staticnoexcept |
Gets all available validation layers.
|
override |
Registers a new graphics device.
| name | The name of the device. |
| device | A std::unique_ptr to the device to register. |
|
overridevirtual |
Unregisters a graphics device.
| name | The name of the device to unregister. This name must match the name used when registering the device. |
Implements spark::render::RenderBackend< VulkanDevice >.
|
staticnoexcept |
Checks if all elements of extensions are contained by the a list of available extensions.
| extensions | The extensions to check. |
true, if all elements of extensions are contained by the a list of available extensions.
|
staticnoexcept |
Checks if all elements of validation_layers are contained by the a list of available validation layers.
| validation_layers | The validation layers to check. |
true, if all elements of validation_layers are contained by the a list of available validation layers.