LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::Rendering::IGraphicsDevice Class Referenceabstract

The interface for a graphics device that. More...

#include <rendering_api.hpp>

Inherited by LiteFX::Rendering::GraphicsDevice< DirectX12GraphicsFactory, DirectX12Surface, DirectX12GraphicsAdapter, DirectX12SwapChain, DirectX12Queue, DirectX12RenderPass, DirectX12ComputePipeline, DirectX12Barrier >, LiteFX::Rendering::GraphicsDevice< VulkanGraphicsFactory, VulkanSurface, VulkanGraphicsAdapter, VulkanSwapChain, VulkanQueue, VulkanRenderPass, VulkanComputePipeline, VulkanBarrier >, and LiteFX::Rendering::GraphicsDevice< TFactory, TSurface, TGraphicsAdapter, TSwapChain, TCommandQueue, TRenderPass, TComputePipeline, TBarrier >.

Public Member Functions

virtual ~IGraphicsDevice () noexcept=default
 
virtual DeviceStatestate () const noexcept=0
 Returns the device state that can be used to manage resources. More...
 
virtual const ISurfacesurface () const noexcept=0
 Returns the surface, the device draws to. More...
 
virtual const IGraphicsAdapteradapter () const noexcept=0
 Returns the graphics adapter, the device uses for drawing. More...
 
virtual const ISwapChainswapChain () const noexcept=0
 Returns the swap chain, that contains the back and front buffers used for presentation. More...
 
virtual ISwapChainswapChain () noexcept=0
 Returns the swap chain, that contains the back and front buffers used for presentation. More...
 
virtual const IGraphicsFactoryfactory () const noexcept=0
 Returns the factory instance, used to create instances from the device. More...
 
virtual const ICommandQueuegraphicsQueue () const noexcept=0
 Returns the instance of the queue, used to process draw calls. More...
 
virtual const ICommandQueuetransferQueue () const noexcept=0
 Returns the instance of the queue used for device-device transfers (e.g. between render-passes). More...
 
virtual const ICommandQueuebufferQueue () const noexcept=0
 Returns the instance of the queue used for host-device transfers. More...
 
virtual const ICommandQueuecomputeQueue () const noexcept=0
 Returns the instance of the queue used for compute calls. More...
 
UniquePtr< IBarriermakeBarrier () const noexcept
 Creates a memory barrier instance. More...
 
virtual MultiSamplingLevel maximumMultiSamplingLevel (const Format &format) const noexcept=0
 Queries the device for the maximum supported number of multi-sampling levels. More...
 
virtual void wait () const =0
 Waits until the device is idle. More...
 

Detailed Description

The interface for a graphics device that.

Constructor & Destructor Documentation

◆ ~IGraphicsDevice()

virtual LiteFX::Rendering::IGraphicsDevice::~IGraphicsDevice ( )
virtualdefaultnoexcept

Member Function Documentation

◆ adapter()

◆ bufferQueue()

◆ computeQueue()

◆ factory()

◆ graphicsQueue()

◆ makeBarrier()

UniquePtr< IBarrier > LiteFX::Rendering::IGraphicsDevice::makeBarrier ( ) const
inlinenoexcept

Creates a memory barrier instance.

Returns
The instance of the memory barrier.

◆ maximumMultiSamplingLevel()

virtual MultiSamplingLevel LiteFX::Rendering::IGraphicsDevice::maximumMultiSamplingLevel ( const Format &  format) const
pure virtualnoexcept

Queries the device for the maximum supported number of multi-sampling levels.

This method returns the maximum supported multi-sampling level for a certain format. Typically you want to pass a back-buffer format for your swap-chain here. All lower multi-sampling levels are implicitly supported for this format.

Parameters
formatThe target (i.e. back-buffer) format.
Returns
The maximum multi-sampling level.

Implemented in LiteFX::Rendering::Backends::DirectX12Device, and LiteFX::Rendering::Backends::VulkanDevice.

◆ state()

virtual DeviceState & LiteFX::Rendering::IGraphicsDevice::state ( ) const
pure virtualnoexcept

Returns the device state that can be used to manage resources.

Returns
A reference of the device state.

Implemented in LiteFX::Rendering::Backends::DirectX12Device, and LiteFX::Rendering::Backends::VulkanDevice.

◆ surface()

◆ swapChain() [1/2]

◆ swapChain() [2/2]

◆ transferQueue()

◆ wait()

virtual void LiteFX::Rendering::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 LiteFX::Rendering::Backends::DirectX12Device, and LiteFX::Rendering::Backends::VulkanDevice.