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

Describes a rendering backend. (backend with type BackendType::Rendering) More...

#include <Backend.h>

Inheritance diagram for spark::render::IRenderBackend:
spark::render::IBackend spark::render::RenderBackend< VulkanDevice > spark::render::RenderBackend< GraphicsDeviceType > spark::render::vk::VulkanBackend

Public Member Functions

BackendType type () const noexcept override
 Gets the type of the backend.
 
std::vector< const IGraphicsAdapter * > adapters () const noexcept
 Lists all available graphics adapters.
 
virtual const IGraphicsAdapterfindAdapter (const std::optional< lib::Uuid > &id=std::nullopt) const =0
 Finds a graphics adapter by unique id.
 
virtual IGraphicsDevicedevice (const std::string &name) noexcept=0
 Searches for a graphics device by name.
 
virtual const IGraphicsDevicedevice (const std::string &name) const noexcept=0
 Searches for a graphics device by name.
 

Detailed Description

Describes a rendering backend. (backend with type BackendType::Rendering)

Member Function Documentation

◆ adapters()

std::vector< const IGraphicsAdapter * > spark::render::IRenderBackend::adapters ( ) const
inlinenodiscardnoexcept

Lists all available graphics adapters.

Returns
A std::vector containing all available graphics adapters.

◆ device() [1/2]

virtual const IGraphicsDevice * spark::render::IRenderBackend::device ( const std::string & name) const
nodiscardpure virtualnoexcept

Searches for a graphics device by name.

Parameters
nameThe name of the graphics device to find.
Returns
A pointer to the graphics device if found, nullptr otherwise.

Implemented in spark::render::RenderBackend< GraphicsDeviceType >, spark::render::RenderBackend< VulkanDevice >, and spark::render::vk::VulkanBackend.

◆ device() [2/2]

virtual IGraphicsDevice * spark::render::IRenderBackend::device ( const std::string & name)
nodiscardpure virtualnoexcept

Searches for a graphics device by name.

Parameters
nameThe name of the graphics device to find.
Returns
A pointer to the graphics device if found, nullptr otherwise.

Implemented in spark::render::RenderBackend< GraphicsDeviceType >, spark::render::RenderBackend< VulkanDevice >, and spark::render::vk::VulkanBackend.

◆ findAdapter()

virtual const IGraphicsAdapter * spark::render::IRenderBackend::findAdapter ( const std::optional< lib::Uuid > & id = std::nullopt) const
nodiscardpure virtual

Finds a graphics adapter by unique id.

Parameters
idThe unique id of the graphics adapter to find. If std::nullopt, the returned adapter is implementation-defined.
Returns
A pointer to the graphics adapter if found, nullptr otherwise.

Implemented in spark::render::RenderBackend< GraphicsDeviceType >, spark::render::RenderBackend< VulkanDevice >, and spark::render::vk::VulkanBackend.

◆ type()

BackendType spark::render::IRenderBackend::type ( ) const
inlinenodiscardoverridevirtualnoexcept

Gets the type of the backend.

Returns
A BackendType value describing the type of the backend.

Implements spark::render::IBackend.