mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-22 07:47:48 +01:00
I don't know what I'm doing
This commit is contained in:
parent
1641166d6e
commit
ef1bbb6d9d
9 changed files with 65 additions and 59 deletions
|
|
@ -1,6 +1,5 @@
|
|||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Kernel;
|
||||
using Penumbra.GameData.Files;
|
||||
using Penumbra.GameData.Interop;
|
||||
using Penumbra.Interop.SafeHandles;
|
||||
|
||||
|
|
@ -9,7 +8,7 @@ namespace Penumbra.Interop.MaterialPreview;
|
|||
public sealed unsafe class LiveColorTablePreviewer : LiveMaterialPreviewerBase
|
||||
{
|
||||
public const int TextureWidth = 4;
|
||||
public const int TextureHeight = MtrlFile.ColorTable.NumRows;
|
||||
public const int TextureHeight = GameData.Files.MaterialStructs.ColorTable.NumUsedRows;
|
||||
public const int TextureLength = TextureWidth * TextureHeight * 4;
|
||||
|
||||
private readonly IFramework _framework;
|
||||
|
|
@ -17,7 +16,7 @@ public sealed unsafe class LiveColorTablePreviewer : LiveMaterialPreviewerBase
|
|||
private readonly Texture** _colorTableTexture;
|
||||
private readonly SafeTextureHandle _originalColorTableTexture;
|
||||
|
||||
private bool _updatePending;
|
||||
private bool _updatePending;
|
||||
|
||||
public Half[] ColorTable { get; }
|
||||
|
||||
|
|
@ -40,7 +39,7 @@ public sealed unsafe class LiveColorTablePreviewer : LiveMaterialPreviewerBase
|
|||
if (_originalColorTableTexture == null)
|
||||
throw new InvalidOperationException("Material doesn't have a color table");
|
||||
|
||||
ColorTable = new Half[TextureLength];
|
||||
ColorTable = new Half[TextureLength];
|
||||
_updatePending = true;
|
||||
|
||||
framework.Update += OnFrameworkUpdate;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue