|
SDL3pp
A slim C++ wrapper for SDL3
|
Base class to Texture. More...
Public Member Functions | |
| constexpr | operator TextureConstRef () const noexcept |
| Converts to TextureConstRef. | |
| void | Destroy () |
| Destroy the specified texture. | |
| PropertiesRef | GetProperties () const |
| Get the properties associated with a texture. | |
| RendererRef | GetRenderer () const |
| Get the renderer that created an Texture. | |
| void | GetSize (float *w, float *h) const |
| Get the size of a texture, as floating point values. | |
| Point | GetSize () const |
| Get the size of a texture. | |
| FPoint | GetSizeFloat () const |
| Get the size of a texture, as floating point values. | |
| int | GetWidth () const |
| Get the width in pixels. | |
| int | GetHeight () const |
| Get the height in pixels. | |
| PixelFormat | GetFormat () const |
| Get the pixel format. | |
| void | SetPalette (PaletteRef palette) |
| Set the palette used by a texture. | |
| Palette | GetPalette () |
| Get the palette used by a texture. | |
| void | SetColorMod (Uint8 r, Uint8 g, Uint8 b) |
| Set an additional color value multiplied into render copy operations. | |
| void | SetColorModFloat (float r, float g, float b) |
| Set an additional color value multiplied into render copy operations. | |
| void | GetColorMod (Uint8 *r, Uint8 *g, Uint8 *b) const |
| Get the additional color value multiplied into render copy operations. | |
| void | GetColorModFloat (float *r, float *g, float *b) const |
| Get the additional color value multiplied into render copy operations. | |
| void | SetAlphaMod (Uint8 alpha) |
| Set an additional alpha value multiplied into render copy operations. | |
| void | SetAlphaModFloat (float alpha) |
| Set an additional alpha value multiplied into render copy operations. | |
| Uint8 | GetAlphaMod () const |
| Get the additional alpha value multiplied into render copy operations. | |
| float | GetAlphaModFloat () const |
| Get the additional alpha value multiplied into render copy operations. | |
| void | SetMod (Color c) |
| Set an additional color and alpha values multiplied into render copy operations. | |
| void | SetModFloat (FColor c) |
| Set an additional color and alpha values multiplied into render copy operations. | |
| Color | GetMod () const |
| Get the additional color value multiplied into render copy operations. | |
| FColor | GetModFloat () const |
| Get the additional color value multiplied into render copy operations. | |
| void | SetBlendMode (BlendMode blendMode) |
| Set the blend mode for a texture, used by RenderTexture(). | |
| BlendMode | GetBlendMode () const |
| Get the blend mode used for texture copy operations. | |
| void | SetScaleMode (ScaleMode scaleMode) |
| Set the scale mode used for texture scale operations. | |
| ScaleMode | GetScaleMode () const |
| Get the scale mode used for texture scale operations. | |
| void | Update (OptionalRef< const RectRaw > rect, const void *pixels, int pitch) |
| Update the given texture rectangle with new pixel data. | |
| void | Update (SurfaceConstRef surface, OptionalRef< const RectRaw > rect=std::nullopt) |
| Update the given texture rectangle with new pixel data. | |
| void | UpdateYUV (OptionalRef< const RectRaw > rect, const Uint8 *Yplane, int Ypitch, const Uint8 *Uplane, int Upitch, const Uint8 *Vplane, int Vpitch) |
| Update a rectangle within a planar YV12 or IYUV texture with new pixel data. | |
| void | UpdateNV (OptionalRef< const RectRaw > rect, const Uint8 *Yplane, int Ypitch, const Uint8 *UVplane, int UVpitch) |
| Update a rectangle within a planar NV12 or NV21 texture with new pixels. | |
| TextureLock | Lock (OptionalRef< const RectRaw > rect, void **pixels, int *pitch) |
| Lock a portion of the texture for write-only pixel access. | |
| TextureSurfaceLock | LockToSurface (OptionalRef< const RectRaw > rect=std::nullopt) |
| Lock a portion of the texture for write-only pixel access, and expose it as a SDL surface. | |
| void | Unlock (TextureLock &&lock) |
| Unlock a texture, uploading the changes to video memory, if needed. | |
| void | Unlock (TextureSurfaceLock &&lock) |
| Unlock a texture, uploading the changes to video memory, if needed. | |
| constexpr | ResourceBaseT ()=default |
| Default constructor, creates null/invalid resource. | |
| constexpr | ResourceBaseT (RawPointer resource) |
| Constructs from resource pointer. | |
| constexpr | ResourceBaseT (std::nullptr_t) |
| Constructs null/invalid. | |
| constexpr | ResourceBaseT (const ResourceBaseT &)=default |
| Copy constructor. | |
| constexpr | ResourceBaseT (ResourceBaseT &&) noexcept=default |
| Move constructor. | |
| Public Member Functions inherited from SDL::ResourceBaseT< TextureRaw, TextureRawConst > | |
| constexpr | ResourceBaseT ()=default |
| Default constructor, creates null/invalid resource. | |
| constexpr | operator bool () const |
| Converts to bool. | |
| constexpr auto | operator<=> (const ResourceBaseT &other) const=default |
| Comparison. | |
| constexpr RawConstPointer | operator-> () const noexcept |
| member access to underlying resource pointer. | |
| constexpr RawPointer | get () const noexcept |
| Retrieves underlying resource pointer. | |
| constexpr RawPointer | release () noexcept |
| Retrieves underlying resource pointer and clear this. | |
Additional Inherited Members | |
| Public Types inherited from SDL::ResourceBaseT< TextureRaw, TextureRawConst > | |
| using | RawPointer |
| The underlying raw pointer type. | |
| using | RawConstPointer |
| The underlying const raw pointer type. | |
| Protected Member Functions inherited from SDL::ResourceBaseT< TextureRaw, TextureRawConst > | |
| constexpr | ~ResourceBaseT ()=default |
| Destructor. | |
| constexpr ResourceBaseT & | operator= (const ResourceBaseT &)=default |
| Assignment operator. | |