5#include <SDL3/SDL_gpu.h>
20 explicit Device(SDL_GPUShaderFormat format_flags,
bool debug_mode =
false);
25 void create(SDL_GPUShaderFormat format_flags,
bool debug_mode =
false);
27 operator SDL_GPUDevice *()
const {
return _device; }
28 operator bool()
const {
return _device; }
33 return SDL_GetGPUShaderFormats(_device);
43 bool operator==(const
Device &other)
const {
44 return _device && (_device == other._device);
48 SDL_GPUDevice *_device;
54 _device = other._device;
55 other._device =
nullptr;
SDL_GPUShaderFormat auto_detect_shader_format_subset(const char *name=nullptr)
Automatically detect which subset of shader formats (MSL, SPIR-V) are compatible with the device.
const char * driverName() const noexcept
SDL_GPUShaderFormat shaderFormats() const
Definition Device.h:32
Device(const Device &)=delete
Device(NoInitT) noexcept
Definition Device.h:51
SDL_GPUDevice * release() noexcept
Release ownership of and return the SDL_GPUDevice handle.
Definition Device.h:37
void create(SDL_GPUShaderFormat format_flags, bool debug_mode=false)
Device(SDL_GPUShaderFormat format_flags, bool debug_mode=false)
Device & operator=(Device &&)=delete
Tag type for non-initializing constructors (for e.g. RAII classes)
Definition Tags.h:6