Handle to an owned textEngine.
More...
|
TextEngineShared | share () |
| Move this textEngine into a TextEngineShared.
|
|
constexpr | ResourceUnique (std::nullptr_t=nullptr) |
| Default constructor.
|
|
constexpr | ResourceUnique (base::value_type value, DELETER deleter={}) |
| Constructs from raw type.
|
|
constexpr | ResourceUnique (ResourceUnique &&other) |
| Move constructor.
|
|
| ResourceUnique (const ResourceUnique &other)=delete |
|
constexpr | ResourceUnique (std::nullptr_t=nullptr) |
| Default constructor.
|
|
constexpr | ResourceUnique (base::value_type value, TextEngineDeleter deleter={}) |
| Constructs from raw type.
|
|
constexpr | ResourceUnique (ResourceUnique &&other) |
| Move constructor.
|
|
| ResourceUnique (const ResourceUnique &other)=delete |
|
| ~ResourceUnique () |
| Destructor.
|
|
constexpr ResourceUnique & | operator= (ResourceUnique other) |
| Assignment operator.
|
|
void | reset () |
| Resets the value, destroying the resource if not nullptr.
|
|
RESOURCE | release () |
| Returns reference and reset this.
|
|
constexpr | operator bool () const |
| Check if not null.
|
|
constexpr bool | operator== (const ResourcePtrBase &other) const |
| Comparison.
|
|
constexpr bool | operator== (std::nullptr_t) const |
| Comparison.
|
|
constexpr bool | operator== (std::nullopt_t) const |
| Comparison.
|
|
constexpr reference | operator* () const |
| Gets reference.
|
|
constexpr const reference * | operator-> () const |
| Gets addressable reference.
|
|
constexpr reference * | operator-> () |
| Gets addressable reference.
|
|
reference | get () const |
| Get reference.
|
|
|
using | deleter = DELETER |
| The deleter type.
|
|
using | reference = RESOURCE |
| The reference resource type.
|
|
using | value_type = typename reference::value_type |
| The raw resource type.
|
|
constexpr | ResourceOwnerBase (base::value_type value={}, DELETER deleter={}) |
| Constructs from raw type.
|
|
void | free () |
| Frees resource.
|
|
constexpr | ResourcePtrBase (value_type value={}) |
| Constructs from raw type.
|
|
reference & | get () |
| Get reference.
|
|
◆ CreateGPU()
static TextEngine SDL::TextEngine::CreateGPU |
( |
SDL_GPUDevice * |
device | ) |
|
|
inlinestatic |
- Parameters
-
device | the SDL_GPUDevice to use for creating textures and drawing text. |
- Returns
- a TextEngineRef 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
- TextEngine.CreateGPUWithProperties
-
TTF_DestroyGPUTextEngine
-
TextRef.GetGPUDrawData
◆ CreateGPUWithProperties()
These are the supported properties:
prop::GpuTextEngine.DEVICE_POINTER
: the SDL_GPUDevice to use for creating textures and drawing text.
prop::GpuTextEngine.ATLAS_TEXTURE_SIZE_NUMBER
: the size of the texture atlas
- Parameters
-
props | the properties to use. |
- Returns
- a TextEngineRef 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
- TextEngine.CreateGPU
-
TTF_DestroyGPUTextEngine
-
TextRef.GetGPUDrawData
◆ CreateRenderer()
◆ CreateRendererWithProperties()
These are the supported properties:
prop::RendererTextEngine.RENDERER_POINTER
: the renderer to use for creating textures and drawing text
prop::RendererTextEngine.ATLAS_TEXTURE_SIZE_NUMBER
: the size of the texture atlas
- Parameters
-
props | the properties to use. |
- Returns
- a TextEngineRef object or nullptr on failure; call GetError() for more information.
- Thread safety:
- This function should be called on the thread that created the renderer.
- Since
- This function is available since SDL_ttf 3.0.0.
- See also
- TextEngine.CreateRenderer
-
TTF_DestroyRendererTextEngine
-
TextRef.DrawRenderer
◆ CreateSurface()
static TextEngine SDL::TextEngine::CreateSurface |
( |
| ) |
|
|
inlinestatic |
- Returns
- a TextEngineRef object or nullptr on failure; call GetError() for more information.
- Thread safety:
- It is safe to call this function from any thread.
- Since
- This function is available since SDL_ttf 3.0.0.
- See also
- TTF_DestroySurfaceTextEngine
-
TextRef.DrawSurface
The documentation for this struct was generated from the following file: