#pragma once #include #include #include #include // and so begins the sdl gpu refactor heh class GPU { static SDL_GPUDevice* device; static SDL_Window* window; static std::stack commandbuffers; static SDL_GPUTexture* swapchain; static SDL_GPURenderPass* renderPass; static SDL_GPUCopyPass* copyPass; public: static std::string GetDetails(); static bool Init(); static void Shutdown(); static SDL_GPUDevice* GetDevice(); static SDL_Window* GetWindow(); static SDL_GPUCommandBuffer* GetCommandBuffer(); static SDL_GPURenderPass* GetRenderPass(); static SDL_GPUCopyPass* GetCopyPass(); static bool ClaimWindow(SDL_Window* window); static bool AquirePushCommandBuffer(); static bool WaitAquireSwapchainWithCommandBuffer(); static SDL_GPUTexture* GetSwapchain(); static SDL_GPUTextureFormat GetSwapchainFormat(); static void BeginRendering(std::list colorTargetInfos, SDL_GPUDepthStencilTargetInfo* depthStencilTargetInfo); static void EndRendering(); static void BeginCopying(); static void EndCopying(); static void SubmitCommandsPopCommandBuffer(); static void SubmitCommandsPopCommandBufferAwaitFence(); };