MoonWorks/src/Graphics/State/TextureCreateInfo.cs

35 lines
813 B
C#
Raw Normal View History

using RefreshCS;
namespace MoonWorks.Graphics
{
2023-09-19 20:19:41 +00:00
/// <summary>
/// All of the information that is used to create a texture.
/// </summary>
2022-02-23 05:14:32 +00:00
public struct TextureCreateInfo
{
public uint Width;
public uint Height;
public uint Depth;
public bool IsCube;
public uint LevelCount;
public SampleCount SampleCount;
2022-02-23 05:14:32 +00:00
public TextureFormat Format;
public TextureUsageFlags UsageFlags;
2022-02-23 05:14:32 +00:00
public Refresh.TextureCreateInfo ToRefreshTextureCreateInfo()
{
return new Refresh.TextureCreateInfo
{
width = Width,
height = Height,
depth = Depth,
isCube = Conversions.BoolToByte(IsCube),
levelCount = LevelCount,
sampleCount = (Refresh.SampleCount) SampleCount,
2022-02-23 05:14:32 +00:00
format = (Refresh.TextureFormat) Format,
usageFlags = (Refresh.TextureUsageFlags) UsageFlags
};
}
}
}