|
Flint Engine
Modular C++20 2D game engine powered by SDL3
|
Helper that extracts SDL GPU objects from an IWindow via dynamic_cast. More...
#include <flint/graphics/gpu/gpu-cast.h>
Collaboration diagram for Flint::GPUWindowCast:Static Public Member Functions | |
| static IGPUContext * | getGPUContext (Flint::IWindow *window) |
Cast window to IGPUContext. | |
| static SDL_GPUDevice * | getDevice (Flint::IWindow *window) |
Return the SDL_GPUDevice from window. | |
| static void | setGPUDevice (Flint::IWindow *window, SDL_GPUDevice *device) |
Store device inside the GPU context of window. | |
| static SDL_GPUCommandBuffer * | getCommandBuffer (Flint::IWindow *window) |
Return the current frame's command buffer from window. | |
| static SDL_GPURenderPass * | getRenderPass (Flint::IWindow *window) |
Return the current frame's render pass from window. | |
Helper that extracts SDL GPU objects from an IWindow via dynamic_cast.
IWindow implementations that also implement IGPUContext (e.g. SdlWindow) can be queried through these static helpers without including the concrete window type.
Definition at line 18 of file gpu-cast.h.