Class Texture
- Namespace
- SharpPluginLoader.Core.Resources
- Assembly
- SharpPluginLoader.Core.dll
Represents a texture resource (an instance of the rTexture class).
public class Texture : Resource
- Inheritance
-
Texture
- Inherited Members
Constructors
Texture()
public Texture()
Texture(nint)
public Texture(nint instance)
Parameters
instance
nint
Properties
Height
The height of the texture.
public uint Height { get; }
Property Value
Width
The width of the texture.
public uint Width { get; }
Property Value
Methods
GetTextureHandle()
Obtains a handle to the texture, which can be passed to ImGui. This method actually uploads the texture to the GPU and creates the resource object.
public TextureHandle GetTextureHandle()
Returns
- TextureHandle
A handle to the texture, or Invalid if the texture couldn't be created.
Remarks
Textures are cached internally, so calling this method multiple times for the same texture will return the same handle.