TGUI 1.13
Loading...
Searching...
No Matches
tgui::BackendRendererSDLGPU Class Reference

Backend renderer that uses SDL3's GPU API. More...

#include <TGUI/Backend/Renderer/SDL_GPU/BackendRendererSDLGPU.hpp>

Inheritance diagram for tgui::BackendRendererSDLGPU:
tgui::BackendRenderer

Public Member Functions

 BackendRendererSDLGPU (SDL_GPUDevice *device, SDL_GPUTextureFormat swapchainTextureFormat)
 Initializes the backend renderer.
std::shared_ptr< BackendTexturecreateTexture () override
 Creates a new empty texture object.
unsigned int getMaximumTextureSize () override
 Get the maximum allowed texture size.
SDL_GPUTextureFormat getSwapchainTextureFormat () const
 Returns the texture format of the swapchain.
SDL_GPUDevice * getInternalDevice () const
 Returns a pointer to the device object that was used to create this backend renderer.
Public Member Functions inherited from tgui::BackendRenderer
virtual ~BackendRenderer ()=default
 Virtual destructor.
virtual std::shared_ptr< BackendTextcreateText ()
 Creates a new empty text object.

Detailed Description

Backend renderer that uses SDL3's GPU API.

Constructor & Destructor Documentation

◆ BackendRendererSDLGPU()

tgui::BackendRendererSDLGPU::BackendRendererSDLGPU ( SDL_GPUDevice * device,
SDL_GPUTextureFormat swapchainTextureFormat )

Initializes the backend renderer.

Parameters
deviceDevice used for rendering
swapchainTextureFormatTexture format of the swapchain

Member Function Documentation

◆ createTexture()

std::shared_ptr< BackendTexture > tgui::BackendRendererSDLGPU::createTexture ( )
nodiscardoverridevirtual

Creates a new empty texture object.

Returns
Shared pointer to a new texture object

Implements tgui::BackendRenderer.

◆ getInternalDevice()

SDL_GPUDevice * tgui::BackendRendererSDLGPU::getInternalDevice ( ) const
nodiscard

Returns a pointer to the device object that was used to create this backend renderer.

Returns
SDL_GPUDevice pointer that was passed to the constructor of this object

◆ getMaximumTextureSize()

unsigned int tgui::BackendRendererSDLGPU::getMaximumTextureSize ( )
nodiscardoverridevirtual

Get the maximum allowed texture size.

Returns
Maximum width and height that you should try to use in a single texture

This maximum size is defined by the graphics driver. Most likely this will return 8192 or 16384.

Implements tgui::BackendRenderer.

◆ getSwapchainTextureFormat()

SDL_GPUTextureFormat tgui::BackendRendererSDLGPU::getSwapchainTextureFormat ( ) const
nodiscard

Returns the texture format of the swapchain.

Returns
Texture format of the swapchain that was passed to the constructor of this object
Since
TGUI 1.13

The documentation for this class was generated from the following file: