34#ifdef WITH_OPENGL_BACKEND
38#ifdef WITH_VULKAN_BACKEND
41#ifdef WITH_METAL_BACKEND
250 g_ghost_system =
reinterpret_cast<GHOST_SystemHandle
>(ghost_system_handle);
285#if defined(WITH_OPENGL_BACKEND)
287#elif defined(WITH_METAL_BACKEND)
307#ifdef WITH_OPENGL_BACKEND
313#ifdef WITH_VULKAN_BACKEND
319#ifdef WITH_METAL_BACKEND
346#ifdef WITH_OPENGL_BACKEND
351#ifdef WITH_VULKAN_BACKEND
356#ifdef WITH_METAL_BACKEND
386#ifdef WITH_OPENGL_BACKEND
392#ifdef WITH_METAL_BACKEND
398#ifdef WITH_VULKAN_BACKEND
@ G_FLAG_GPU_BACKEND_FALLBACK
GHOST C-API function and type declarations.
GPUContext * GPU_context_create(void *ghost_window, void *ghost_context)
void GPU_context_main_lock()
void GPU_backend_type_selection_set(const eGPUBackendType backend)
bool GPU_backend_supported()
void * GPU_backend_ghost_system_get()
void GPU_context_begin_frame(GPUContext *ctx)
bool GPU_backend_type_selection_is_overridden()
GPUContext * GPU_context_active_get()
eGPUBackendType GPU_backend_type_selection_get()
void GPU_context_main_unlock()
void GPU_context_discard(GPUContext *)
bool GPU_backend_type_selection_detect()
void GPU_context_end_frame(GPUContext *ctx)
void GPU_context_active_set(GPUContext *)
eGPUBackendType GPU_backend_get_type()
void GPU_backend_ghost_system_set(void *ghost_system_handle)
void GPU_backend_type_selection_set_override(eGPUBackendType backend_type)
struct GPUContext GPUContext
StateManager * state_manager
GPUMatrixState * matrix_state
bool is_active_on_thread()
static int context_counter
FrameBuffer * front_right
virtual void activate()=0
virtual void end_frame()=0
virtual void begin_frame()=0
virtual void deactivate()=0
virtual void render_end()=0
static GPUBackend * get()
virtual void delete_resources()=0
virtual void render_begin()=0
virtual Context * context_alloc(void *ghost_window, void *ghost_context)=0
virtual void render_step()=0
static bool metal_is_supported()
static bool is_supported()
static std::optional< bool > g_backend_type_supported
static bool gpu_backend_supported()
static thread_local Context * active_ctx
static std::mutex backend_users_mutex
static int num_backend_users
static eGPUBackendType g_backend_type
static void gpu_backend_discard()
void gpu_backend_delete_resources()
static std::mutex main_context_mutex
static void gpu_backend_create()
static GHOST_SystemHandle g_ghost_system
static GPUBackend * g_backend
static std::optional< eGPUBackendType > g_backend_type_override
GPUMatrixState * GPU_matrix_state_create()
void GPU_matrix_state_discard(GPUMatrixState *state)
static Context * unwrap(GPUContext *ctx)
static GPUContext * wrap(Context *ctx)
void printf_begin(Context *ctx)
void printf_end(Context *ctx)