kernel texture stuff
namespace FFXIVClientStructs.Client.Graphics.Render
{
+
+ // there's 20+ of these but these are the ones I've encountered/debugged
+ public enum TextureFormat : uint
+ {
+ R8G8B8A8 = 5200,
+ D24S8 = 16976 // depth 28 stencil 8, see MS texture formats on google if you really care :)
+ }
+
// Client::Graphics::Kernel::Texture
// Client::Graphics::Kernel::Resource
// Client::Graphics::Kernel::DelayedReleaseClassBase
@@ -15,8 +23,18 @@ namespace FFXIVClientStructs.Client.Graphics.Render
[StructLayout(LayoutKind.Explicit, Size = 0xA8)]
public unsafe struct Texture
{
- [FieldOffset(0x0)] public void* vtbl; // Client::Graphics::Kernel::Resource
- [FieldOffset(0x20)] public void* vtbl_2; // Client::Graphics::Kernel::Notifier
- // texture object starts at 0x28
+ [FieldOffset(0x00)] public void* vtbl;
+ [FieldOffset(0x20)] public Notifier Notifier;
+ [FieldOffset(0x38)] public uint Width;
+ [FieldOffset(0x3C)] public uint Height;
+ [FieldOffset(0x40)] public uint Depth; // for 3d textures like the material tiling texture
+ [FieldOffset(0x44)] public byte MipLevel;
+ [FieldOffset(0x45)] public byte Unk_35;
+ [FieldOffset(0x46)] public byte Unk_36;
+ [FieldOffset(0x47)] public byte Unk_37;
+ [FieldOffset(0x48)] public TextureFormat TextureFormat;
+ [FieldOffset(0x4C)] public uint Flags;
+ [FieldOffset(0x50)] public void* D3D11Texture2D; // ID3D11Texture2D1
+ [FieldOffset(0x58)] public void* D3D11ShaderResourceView; // ID3D11ShaderResourceView1
}
}
