Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ITextureProvider.ConvertToKernelTexture #2003

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Soreepeong
Copy link
Contributor

Lets you obtain an instance of Kernel::Texture from IDalamudTextureWrap.

Context: https://discord.com/channels/581875019861328007/653504487352303619/1270253907485921280

Displaying contents that is difficult to represent using game's native UI toolkit might be a common use case (eg. unsupported glyphs for various languages), so supporting displaying textures on them could be nice.

Lets you obtain an instance of Kernel::Texture from IDalamudTextureWrap.
@Soreepeong Soreepeong requested a review from a team as a code owner August 6, 2024 07:59
/// <param name="leaveWrapOpen">Whether to leave <paramref name="wrap"/> non-disposed when the returned
/// <see cref="Task{TResult}"/> completes.</param>
/// <returns>Address of the new <see cref="FFXIVClientStructs.FFXIV.Client.Graphics.Kernel.Texture"/>.</returns>
nint ConvertToKernelTexture(IDalamudTextureWrap wrap, bool leaveWrapOpen = false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it would be wise to write a little bit about lifecycle here? How are you supposed to use this, what happens when you call this with texture wraps from shared textures, what are you supposed to do with the texture you're replacing and do you need to do anything to what you get back here when the texture is no longer used by the game?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants