remove Bit from flags enum

pull/14/head
cosmonaut 2021-01-25 20:47:39 -08:00
parent ce27a4bc4c
commit 66e0fe9924
3 changed files with 7 additions and 7 deletions

View File

@ -85,8 +85,8 @@ namespace MoonWorks.Graphics
[Flags]
public enum TextureUsageFlags : uint
{
SamplerBit = 1,
ColorTargetBit = 2
Sampler = 1,
ColorTarget = 2
}
public enum SampleCount

View File

@ -20,8 +20,8 @@ namespace MoonWorks.Graphics
uint levelCount = 1
)
{
var flags = TextureUsageFlags.ColorTargetBit;
if (canBeSampled) { flags |= TextureUsageFlags.SamplerBit; }
var flags = TextureUsageFlags.ColorTarget;
if (canBeSampled) { flags |= TextureUsageFlags.Sampler; }
var texture = Texture.CreateTexture2D(
device,
@ -41,8 +41,8 @@ namespace MoonWorks.Graphics
public ColorTarget(GraphicsDevice device, SampleCount sampleCount, ref TextureSlice textureSlice) : base(device)
{
Handle = Refresh.Refresh_CreateColorTarget(
device.Handle,
(Refresh.SampleCount) sampleCount,
device.Handle,
(Refresh.SampleCount) sampleCount,
textureSlice.ToRefreshTextureSlice()
);
TextureSlice = textureSlice;

View File

@ -30,7 +30,7 @@ namespace MoonWorks.Graphics
textureCreateInfo.IsCube = false;
textureCreateInfo.LevelCount = 1;
textureCreateInfo.SampleCount = SampleCount.One;
textureCreateInfo.UsageFlags = TextureUsageFlags.SamplerBit;
textureCreateInfo.UsageFlags = TextureUsageFlags.Sampler;
var texture = new Texture(device, textureCreateInfo);