1#ifndef YAZE_APP_GFX_BACKEND_RENDERER_FACTORY_H_
2#define YAZE_APP_GFX_BACKEND_RENDERER_FACTORY_H_
7#include <TargetConditionals.h>
65 static std::unique_ptr<IRenderer>
Create(
70 return std::make_unique<SDL2Renderer>();
77 return std::make_unique<SDL3Renderer>();
80 return std::make_unique<SDL2Renderer>();
85 return std::make_unique<MetalRenderer>();
94#if defined(__APPLE__) && (TARGET_OS_IPHONE == 1 || TARGET_IPHONE_SIMULATOR == 1)
95 return std::make_unique<MetalRenderer>();
96#elif defined(YAZE_USE_SDL3)
97 return std::make_unique<SDL3Renderer>();
99 return std::make_unique<SDL2Renderer>();
124#if defined(__APPLE__)
169#if defined(__APPLE__) && (TARGET_OS_IPHONE == 1 || TARGET_IPHONE_SIMULATOR == 1)
171#elif defined(YAZE_USE_SDL3)
Factory class for creating IRenderer instances.
static RendererBackendType GetDefaultBackendType()
Get the default backend type for this build.
static std::unique_ptr< IRenderer > Create(RendererBackendType type=RendererBackendType::kDefault)
Create a renderer instance with the specified backend type.
static const char * GetBackendName(RendererBackendType type)
Get a string name for a backend type.
static bool IsBackendAvailable(RendererBackendType type)
Check if a specific backend type is available in this build.
RendererBackendType
Enumeration of available rendering backend types.
@ SDL3
SDL3 renderer backend.
@ SDL2
SDL2 renderer backend.
@ kAutoDetect
Automatically select the best available backend.
@ kDefault
Use the default backend based on build configuration.
@ Metal
Metal renderer backend (Apple platforms)