2026-06-06 23:25:14 +03:00
|
|
|
using TexmLib;
|
|
|
|
|
|
2026-06-06 21:26:56 +03:00
|
|
|
namespace NResUI.Rendering.Viewport;
|
|
|
|
|
|
|
|
|
|
public sealed class ViewportMaterial
|
|
|
|
|
{
|
|
|
|
|
public string Name { get; }
|
|
|
|
|
public uint TextureHandle { get; }
|
|
|
|
|
public bool HasTexture => TextureHandle != 0;
|
|
|
|
|
|
2026-06-06 23:25:14 +03:00
|
|
|
public TexmFile? Texm { get; }
|
|
|
|
|
|
|
|
|
|
public ViewportMaterial(string name, uint textureHandle = 0, TexmFile? texm = null)
|
2026-06-06 21:26:56 +03:00
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
TextureHandle = textureHandle;
|
2026-06-06 23:25:14 +03:00
|
|
|
Texm = texm;
|
2026-06-06 21:26:56 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ViewportMaterial Untextured { get; } = new("Untextured");
|
|
|
|
|
}
|