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#include <TGUI/Backend/Window/SDL/BackendSDL.hpp>
34#include <TGUI/Backend/Renderer/SDL_GPU/BackendRendererSDLGPU.hpp>
35#include <TGUI/Backend/Font/SDL_ttf/BackendFontSDLttf.hpp>
39 inline namespace SDL_GPU
61 Gui(SDL_Window* window, SDL_GPUDevice* device)
72 void setWindow(SDL_Window* window, SDL_GPUDevice* device);
86 TGUI_ASSERT(
false,
"The SDL_GPU backend requires that you pass SDL_GPUCommandBuffer and SDL_GPURenderPass pointers to the draw function");
87 throw Exception(
"The SDL_GPU backend requires that you pass SDL_GPUCommandBuffer and SDL_GPURenderPass pointers to the draw function");
99 void prepareDraw(SDL_GPUCommandBuffer* cmdBuffer, SDL_GPUCopyPass* copyPass =
nullptr);
111 void draw(SDL_GPURenderPass* renderPass);
129 SDL_GPUDevice* m_device =
nullptr;
BackendGuiSDL()=default
Default constructor.
Wrapper for colors.
Definition Color.hpp:71
Definition Exception.hpp:46
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:61
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:84
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:36