Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches
gpu-context.h
1// SPDX-License-Identifier: MIT
2// SPDX-FileCopyrightText: 2025-2026 Manuel Osorio
3#pragma once
4#include <SDL3/SDL_gpu.h>
5
6namespace Flint {
15 public:
16 virtual ~IGPUContext() = default;
17
23 virtual void setGPUDevice(SDL_GPUDevice *device) = 0;
24
30 virtual SDL_GPUDevice *getGPUDevice() = 0;
31
39 virtual SDL_GPUCommandBuffer *getCommandBuffer() = 0;
40
48 virtual SDL_GPURenderPass *getRenderPass() = 0;
49 };
50}
virtual void setGPUDevice(SDL_GPUDevice *device)=0
Store the SDL GPU device created by the renderer.
virtual SDL_GPUCommandBuffer * getCommandBuffer()=0
Return the current frame's command buffer.
virtual SDL_GPUDevice * getGPUDevice()=0
Return the SDL GPU device associated with this context.
virtual SDL_GPURenderPass * getRenderPass()=0
Return the current frame's render pass.
Interface that exposes low-level SDL GPU objects from a window implementation.
Definition gpu-context.h:14