SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::GPUTextEngine Struct Reference

A GPU based text engine.

Inheritance diagram for SDL::GPUTextEngine:
Inheritance graph
[legend]
Collaboration diagram for SDL::GPUTextEngine:
Collaboration graph
[legend]

Public Member Functions

 GPUTextEngine (GPUDeviceParam device)
 Create a text engine for drawing text with the SDL GPU API. More...
 
 GPUTextEngine (PropertiesParam props)
 Create a text engine for drawing text with the SDL GPU API, with the specified properties. More...
 
void SetGPUWinding (GPUTextEngineWinding winding)
 Sets the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine. More...
 
GPUTextEngineWinding GetGPUWinding () const
 Get the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine. More...
 
void Destroy () final
 Destroy a text engine created for drawing text with the SDL GPU API. More...
 
- Public Member Functions inherited from SDL::TextEngine
constexpr TextEngine ()=default
 Default ctor.
 
constexpr TextEngine (const TextEngineRaw resource)
 Constructs from TextEngineParam. More...
 
constexpr TextEngine (const TextEngine &other)=delete
 Copy constructor.
 
constexpr TextEngine (TextEngine &&other)
 Move constructor.
 
virtual ~TextEngine ()=default
 Destructor.
 
TextEngineoperator= (TextEngine &&other)
 Assignment operator.
 
TextEngineoperator= (const TextEngine &other)=delete
 Assignment operator.
 
constexpr TextEngineRaw get () const
 Retrieves underlying TextEngineRaw.
 
constexpr TextEngineRaw release ()
 Retrieves underlying TextEngineRaw and clear this.
 
constexpr auto operator<=> (const TextEngine &other) const =default
 Comparison.
 
constexpr bool operator== (std::nullptr_t _) const
 Comparison.
 
constexpr operator bool () const
 Converts to bool.
 
constexpr operator TextEngineParam () const
 Converts to TextEngineParam.
 
virtual void Destroy ()=0
 frees up textEngine. Pure virtual More...
 
Text CreateText (FontParam font, std::string_view text)
 Create a text object from UTF-8 text and a text engine. More...
 

Constructor & Destructor Documentation

◆ GPUTextEngine() [1/2]

SDL::GPUTextEngine::GPUTextEngine ( GPUDeviceParam  device)
inline
Parameters
devicethe GPUDevice to use for creating textures and drawing text.
Postcondition
a TextEngine object or nullptr on failure; call GetError() for more information.
Thread safety:
This function should be called on the thread that created the device.
Since
This function is available since SDL_ttf 3.0.0.
See also
GPUTextEngine.GPUTextEngine
GPUTextEngine.Destroy
Text.GetGPUDrawData

◆ GPUTextEngine() [2/2]

SDL::GPUTextEngine::GPUTextEngine ( PropertiesParam  props)
inline

These are the supported properties:

  • prop::GpuTextEngine.DEVICE_POINTER: the GPUDevice to use for creating textures and drawing text.
  • prop::GpuTextEngine.ATLAS_TEXTURE_SIZE_NUMBER: the size of the texture atlas
Parameters
propsthe properties to use.
Postcondition
a TextEngine object or nullptr on failure; call GetError() for more information.
Thread safety:
This function should be called on the thread that created the device.
Since
This function is available since SDL_ttf 3.0.0.
See also
GPUTextEngine.GPUTextEngine
GPUTextEngine.Destroy
Text.GetGPUDrawData

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