Interface IDalamudTextureWrap
Base TextureWrap interface for all Dalamud-owned texture wraps. Used to avoid referencing ImGuiScene.
Remarks​
If you want to implement this, see if you're actually wrapping an existing instance of Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap; if you are, then use Dalamud.Interface.Textures.TextureWraps.ForwardingTextureWrap.
Assembly: Dalamud.dll​
public interface IDalamudTextureWrap : IDisposable
Derived:
Dalamud.Interface.Textures.TextureWraps.ForwardingTextureWrap
Properties​
Handle​
Gets a texture handle suitable for direct use with ImGui functions.
ImTextureID Handle { get; }
Width​
Gets the width of the texture.
int Width { get; }
Height​
Gets the height of the texture.
int Height { get; }
Size​
Gets the size vector of the texture using Width, Height.
Vector2 Size { get; }
Methods​
CreateWrapSharingLowLevelResource()​
Creates a new reference to the resource being pointed by this instance of Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap.
IDalamudTextureWrap CreateWrapSharingLowLevelResource()
Returns​
Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap: The new reference to this texture wrap.
Remarks​
On calling this function, a new instance of Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap will be returned, but with
the same Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap.Handle. The new instance must be System.IDisposable.Disposed, as the backing
resource will stay alive until all the references are released. The old instance may be disposed as needed,
once this function returns; the new instance will stay alive regardless of whether the old instance has been
disposed.
Primary purpose of this function is to share textures across plugin boundaries. When texture wraps get passed across plugin boundaries for use for an indeterminate duration, the receiver should call this function to obtain a new reference to the texture received, so that it gets its own "copy" of the texture and the caller may dispose the texture anytime without any care for the receiver.
The default implementation will treat Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap.Handle as an TerraFX.Interop.Windows.IUnknown.