expose imguiscene method to load textures from raw pixel data; underlying handling may change, but UIBuilder api can probably remain this way

This commit is contained in:
meli 2020-04-03 16:42:20 -07:00
parent c9d7846d4c
commit a80218d741
3 changed files with 25 additions and 1 deletions

View file

@ -148,6 +148,19 @@ namespace Dalamud.Interface
return null;
}
public TextureWrap LoadImageRaw(byte[] imageData, int width, int height, int numChannels)
{
try
{
return this.scene?.LoadImageRaw(imageData, width, height, numChannels) ?? null;
}
catch (Exception ex)
{
Log.Error(ex, "Failed to load image from raw data");
}
return null;
}
private IntPtr PresentDetour(IntPtr swapChain, uint syncInterval, uint presentFlags)
{
if (this.scene == null)