25#ifndef TGUI_BACKEND_SDL_GPU_INCLUDE_HPP
26#define TGUI_BACKEND_SDL_GPU_INCLUDE_HPP
28#include <TGUI/Config.hpp>
29#if !TGUI_HAS_BACKEND_SDL_GPU
30 #error "TGUI wasn't build with the SDL_GPU backend"
33#if !TGUI_BUILD_AS_CXX_MODULE
34 #include <TGUI/Backend/Window/SDL/BackendSDL.hpp>
35 #include <TGUI/Backend/Renderer/SDL_GPU/BackendRendererSDLGPU.hpp>
36 #include <TGUI/Backend/Font/SDL_ttf/BackendFontSDLttf.hpp>
39TGUI_MODULE_EXPORT
namespace tgui
41 inline namespace SDL_GPU
63 Gui(SDL_Window* window, SDL_GPUDevice* device)
74 void setWindow(SDL_Window* window, SDL_GPUDevice* device);
88 TGUI_ASSERT(
false,
"The SDL_GPU backend requires that you pass SDL_GPUCommandBuffer and SDL_GPURenderPass pointers to the draw function");
89 throw Exception(
"The SDL_GPU backend requires that you pass SDL_GPUCommandBuffer and SDL_GPURenderPass pointers to the draw function");
101 void prepareDraw(SDL_GPUCommandBuffer* cmdBuffer, SDL_GPUCopyPass* copyPass =
nullptr);
113 void draw(SDL_GPURenderPass* renderPass);
131 SDL_GPUDevice* m_device =
nullptr;
BackendGuiSDL()=default
Default constructor.
Wrapper for colors.
Definition Color.hpp:73
Definition Exception.hpp:48
void presentScreen() override
Not used by this backend.
Gui(SDL_Window *window, SDL_GPUDevice *device)
Constructor that immediately sets the window and renderer on which the gui should be drawn.
Definition SDL-GPU.hpp:63
void renderFrame(Color clearColor) override
Clears the screen, draws the gui and then presents the frame.
void setWindow(SDL_Window *window, SDL_GPUDevice *device)
Sets the window and renderer on which the gui should be drawn.
void draw(SDL_GPURenderPass *renderPass)
Draws all the widgets that were added to the gui.
void prepareDraw(SDL_GPUCommandBuffer *cmdBuffer, SDL_GPUCopyPass *copyPass=nullptr)
Prepares drawing the gui and all of its widgets.
void draw() override
This function is not used by this backend, use draw(SDL_GPUCommandBuffer*, SDL_GPURenderPass*) instea...
Definition SDL-GPU.hpp:86
SDL_GPUDevice * getDevice() const
Returns the renderer that was provided to the gui.
Gui()=default
Default constructor.
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:38