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] [Flags]
public enum TextureUsageFlags : uint public enum TextureUsageFlags : uint
{ {
SamplerBit = 1, Sampler = 1,
ColorTargetBit = 2 ColorTarget = 2
} }
public enum SampleCount public enum SampleCount

View File

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

View File

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