mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-23 17:09:17 +01:00
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:
parent
c9d7846d4c
commit
a80218d741
3 changed files with 25 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue