SPARK
0.1.0
A general purpose game engine written in C++.
|
Vulkan implementation of IGraphicsDevice. More...
#include <VulkanDevice.h>
Classes | |
struct | Impl |
Public Member Functions | |
VulkanDevice (const VulkanGraphicsAdapter &adapter, std::unique_ptr< VulkanSurface > &&surface, std::span< std::string > extensions={}) | |
Initializes a new VulkanDevice. | |
VulkanDevice (const VulkanGraphicsAdapter &adapter, std::unique_ptr< VulkanSurface > &&surface, Format format, const math::Vector2< unsigned > &frame_buffer_size, unsigned frame_buffers, std::span< std::string > extensions={}) | |
Initializes a new VulkanDevice. | |
VulkanDevice (const VulkanDevice &other)=delete | |
VulkanDevice (VulkanDevice &&other) noexcept=delete | |
VulkanDevice & | operator= (const VulkanDevice &other)=delete |
VulkanDevice & | operator= (VulkanDevice &&other) noexcept=delete |
std::span< std::string > | enabledExtensions () const noexcept |
Gets the extensions used to initialize the device. | |
MultiSamplingLevel | maximumMultiSamplingLevel (Format format) const noexcept override |
Gets the maximum number of multi-sampling levels supported for the given format. | |
double | ticksPerMillisecond () const noexcept override |
Gets the number of GPU ticks per millisecond. | |
void | wait () const override |
Waits until the device is idle. | |
DeviceState & | state () noexcept override |
Gets the device state used to manage the device resources. | |
const VulkanSurface & | surface () const noexcept override |
Gets the surface the device is rendering to. | |
const VulkanGraphicsAdapter & | graphicsAdapter () const noexcept override |
Gets the graphics adapter the device uses for drawing. | |
const VulkanFactory & | factory () const noexcept override |
Gets the graphics factory used to create buffers, textures, samplers from the device. | |
const VulkanSwapChain & | swapChain () const noexcept override |
Gets the graphics adapter that contains the front and back buffers used for presentation. | |
VulkanSwapChain & | swapChain () noexcept override |
Gets the graphics adapter that contains the front and back buffers used for presentation. | |
const VulkanQueue & | graphicsQueue () const noexcept override |
Gets the queue instance used to process draw calls. | |
const VulkanQueue & | transferQueue () const noexcept override |
Gets the queue instance used for device-device transfers (e.g. between render-passes). | |
const VulkanQueue & | bufferQueue () const noexcept override |
Gets the queue instance used for buffer transfers (e.g. between CPU and GPU). | |
const VulkanQueue & | computeQueue () const noexcept override |
Gets the queue instance used for compute operations. | |
![]() | |
Resource (VkDevice 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 VkDevice & | handle () const final |
Gets the managed resource handle. | |
Additional Inherited Members | |
![]() | |
using | surface_type |
using | adapter_type |
using | swap_chain_type |
using | command_queue_type |
using | command_buffer_type |
using | factory_type |
using | descriptor_layout_type |
using | vertex_buffer_type |
using | index_buffer_type |
using | buffer_type |
using | image_type |
using | sampler_type |
using | render_pass_type |
using | frame_buffer_type |
using | render_pipeline_type |
using | pipeline_layout_type |
using | shader_program_type |
using | input_assembler_type |
using | rasterizer_type |
![]() | |
using | handle_type |
![]() | |
VkDevice & | handle () final |
Gets the managed resource handle. | |
Vulkan implementation of IGraphicsDevice.
|
explicit |
Initializes a new VulkanDevice.
adapter | The adapter to use for drawing. |
surface | The surface the device will draw to. |
extensions | The required extensions for the device to be initialized with. |
|
explicit |
Initializes a new VulkanDevice.
adapter | The adapter to use for drawing. |
surface | The surface the device will draw to. |
format | The initial format of the swap chain. |
frame_buffer_size | The initial size of the frame buffers. |
frame_buffers | The initial number of frame buffers to use. |
extensions | The required extensions for the device to be initialized with. |
|
nodiscardoverridevirtualnoexcept |
Gets the queue instance used for buffer transfers (e.g. between CPU and GPU).
|
nodiscardoverridevirtualnoexcept |
Gets the queue instance used for compute operations.
|
nodiscardnoexcept |
Gets the extensions used to initialize the device.
|
nodiscardoverridevirtualnoexcept |
Gets the graphics factory used to create buffers, textures, samplers from the device.
|
nodiscardoverridevirtualnoexcept |
Gets the graphics adapter the device uses for drawing.
|
nodiscardoverridevirtualnoexcept |
Gets the queue instance used to process draw calls.
|
nodiscardoverridevirtualnoexcept |
Gets the maximum number of multi-sampling levels supported for the given format.
format | The Format of the target (i.e. back buffer). |
Implements spark::render::IGraphicsDevice.
|
nodiscardoverridevirtualnoexcept |
Gets the device state used to manage the device resources.
|
nodiscardoverridevirtualnoexcept |
Gets the surface the device is rendering to.
|
nodiscardoverridevirtualnoexcept |
Gets the graphics adapter that contains the front and back buffers used for presentation.
|
nodiscardoverridevirtualnoexcept |
Gets the graphics adapter that contains the front and back buffers used for presentation.
|
nodiscardoverridevirtualnoexcept |
Gets the number of GPU ticks per millisecond.
Implements spark::render::IGraphicsDevice.
|
nodiscardoverridevirtualnoexcept |
Gets the queue instance used for device-device transfers (e.g. between render-passes).
|
overridevirtual |
Waits until the device is idle.
The complexity of this operation may depend on the graphics API that implements this method. Calling this method guarantees, that the device resources are in an unused state and may safely be released.
Implements spark::render::IGraphicsDevice.