group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
GraphicsConfig.hpp File Reference

Graphics configuration loaded from config.toml at startup. More...

#include <string>
Include dependency graph for GraphicsConfig.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GraphicsConfig

Enumerations

enum class  GpuBackend { Auto , Direct3D12 , Vulkan , Metal }
 Selected GPU backend / driver. More...

Functions

GraphicsConfig loadGraphicsConfig (const char *path)
const char * gpuBackendHintString (GpuBackend backend)
 Map GpuBackend to the string SDL expects in SDL_HINT_GPU_DRIVER.

Detailed Description

Graphics configuration loaded from config.toml at startup.

Enumeration Type Documentation

◆ GpuBackend

enum class GpuBackend
strong

Selected GPU backend / driver.

Maps to SDL3's SDL_HINT_GPU_DRIVER values when set explicitly. Auto leaves the hint unset and lets SDL pick the best available backend for the platform.

Enumerator
Auto 
Direct3D12 
Vulkan 
Metal 

Function Documentation

◆ gpuBackendHintString()

const char * gpuBackendHintString ( GpuBackend backend)
nodiscard

Map GpuBackend to the string SDL expects in SDL_HINT_GPU_DRIVER.

Returns nullptr for GpuBackend::Auto (do not set the hint).

Here is the caller graph for this function:

◆ loadGraphicsConfig()

GraphicsConfig loadGraphicsConfig ( const char * path)
nodiscard
Here is the caller graph for this function: