SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::render::IGraphicsDevice Class Referenceabstract

Interface for a graphics device. More...

#include <GraphicsDevice.h>

Inheritance diagram for spark::render::IGraphicsDevice:
spark::render::GraphicsDevice< VulkanFactory, VulkanSurface, VulkanGraphicsAdapter, VulkanSwapChain, VulkanQueue, VulkanRenderPass > spark::render::GraphicsDevice< FactoryType, SurfaceType, GraphicsAdapterType, SwapChainType, CommandQueueType, RenderPassType > spark::render::vk::VulkanDevice

Public Member Functions

virtual DeviceStatestate () noexcept=0
 Gets the device state used to manage the device resources.
 
virtual const ISurfacesurface () const noexcept=0
 Gets the surface the device is rendering to.
 
virtual const IGraphicsFactoryfactory () const noexcept=0
 Gets the graphics factory used to create buffers, textures, samplers from the device.
 
virtual const IGraphicsAdaptergraphicsAdapter () const noexcept=0
 Gets the graphics adapter the device uses for drawing.
 
virtual const ISwapChainswapChain () const noexcept=0
 Gets the graphics adapter that contains the front and back buffers used for presentation.
 
virtual ISwapChainswapChain () noexcept=0
 Gets the graphics adapter that contains the front and back buffers used for presentation.
 
virtual const ICommandQueuegraphicsQueue () const noexcept=0
 Gets the queue instance used to process draw calls.
 
virtual const ICommandQueuetransferQueue () const noexcept=0
 Gets the queue instance used for device-device transfers (e.g. between render-passes).
 
virtual const ICommandQueuebufferQueue () const noexcept=0
 Gets the queue instance used for buffer transfers (e.g. between CPU and GPU).
 
virtual const ICommandQueuecomputeQueue () const noexcept=0
 Gets the queue instance used for compute operations.
 
virtual MultiSamplingLevel maximumMultiSamplingLevel (Format format) const noexcept=0
 Gets the maximum number of multi-sampling levels supported for the given format.
 
virtual double ticksPerMillisecond () const noexcept=0
 Gets the number of GPU ticks per millisecond.
 
virtual void wait () const =0
 Waits until the device is idle.
 

Detailed Description

Interface for a graphics device.

Member Function Documentation

◆ bufferQueue()

virtual const ICommandQueue & spark::render::IGraphicsDevice::bufferQueue ( ) const
nodiscardpure virtualnoexcept

Gets the queue instance used for buffer transfers (e.g. between CPU and GPU).

Returns
The ICommandQueue used for buffer transfers.
Note
This can be the same as the graphicsQueue if the device does not support dedicated transfer queues.

Implemented in spark::render::GraphicsDevice< FactoryType, SurfaceType, GraphicsAdapterType, SwapChainType, CommandQueueType, RenderPassType >, spark::render::GraphicsDevice< VulkanFactory, VulkanSurface, VulkanGraphicsAdapter, VulkanSwapChain, VulkanQueue, VulkanRenderPass >, and spark::render::vk::VulkanDevice.

◆ computeQueue()

virtual const ICommandQueue & spark::render::IGraphicsDevice::computeQueue ( ) const
nodiscardpure virtualnoexcept

◆ factory()

virtual const IGraphicsFactory & spark::render::IGraphicsDevice::factory ( ) const
nodiscardpure virtualnoexcept

◆ graphicsAdapter()

virtual const IGraphicsAdapter & spark::render::IGraphicsDevice::graphicsAdapter ( ) const
nodiscardpure virtualnoexcept

◆ graphicsQueue()

virtual const ICommandQueue & spark::render::IGraphicsDevice::graphicsQueue ( ) const
nodiscardpure virtualnoexcept

◆ maximumMultiSamplingLevel()

virtual MultiSamplingLevel spark::render::IGraphicsDevice::maximumMultiSamplingLevel ( Format format) const
nodiscardpure virtualnoexcept

Gets the maximum number of multi-sampling levels supported for the given format.

Parameters
formatThe Format of the target (i.e. back buffer).
Returns
The maximum MultiSamplingLevel supported for the given format.

Implemented in spark::render::vk::VulkanDevice.

◆ state()

◆ surface()

virtual const ISurface & spark::render::IGraphicsDevice::surface ( ) const
nodiscardpure virtualnoexcept

◆ swapChain() [1/2]

virtual const ISwapChain & spark::render::IGraphicsDevice::swapChain ( ) const
nodiscardpure virtualnoexcept

◆ swapChain() [2/2]

virtual ISwapChain & spark::render::IGraphicsDevice::swapChain ( )
nodiscardpure virtualnoexcept

◆ ticksPerMillisecond()

virtual double spark::render::IGraphicsDevice::ticksPerMillisecond ( ) const
nodiscardpure virtualnoexcept

Gets the number of GPU ticks per millisecond.

Returns
The number of GPU ticks per millisecond.

Implemented in spark::render::vk::VulkanDevice.

◆ transferQueue()

virtual const ICommandQueue & spark::render::IGraphicsDevice::transferQueue ( ) const
nodiscardpure virtualnoexcept

Gets the queue instance used for device-device transfers (e.g. between render-passes).

Returns
The ICommandQueue used for device-device transfers.
Note
This can be the same as the graphicsQueue if the device does not support dedicated transfer queues.

Implemented in spark::render::GraphicsDevice< FactoryType, SurfaceType, GraphicsAdapterType, SwapChainType, CommandQueueType, RenderPassType >, spark::render::GraphicsDevice< VulkanFactory, VulkanSurface, VulkanGraphicsAdapter, VulkanSwapChain, VulkanQueue, VulkanRenderPass >, and spark::render::vk::VulkanDevice.

◆ wait()

virtual void spark::render::IGraphicsDevice::wait ( ) const
pure virtual

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.

Implemented in spark::render::vk::VulkanDevice.