MoonWorks/src/Graphics/RefreshEnums.cs

308 lines
4.2 KiB
C#
Raw Normal View History

using System;
2022-09-30 20:02:51 +00:00
namespace MoonWorks
{
2023-09-19 20:19:41 +00:00
/// <summary>
/// Presentation mode for a window.
/// </summary>
2022-02-23 05:14:32 +00:00
public enum PresentMode
{
2023-09-19 20:19:41 +00:00
/// <summary>
/// Does not wait for v-blank to update the window. Can cause visible tearing.
/// </summary>
2022-02-23 05:14:32 +00:00
Immediate,
2023-09-19 20:19:41 +00:00
/// <summary>
/// Waits for v-blank and uses a queue to hold present requests.
/// Allows for low latency while preventing tearing.
/// May not be supported on non-Vulkan non-Linux systems or older hardware.
/// </summary>
2022-02-23 05:14:32 +00:00
Mailbox,
2023-09-19 20:19:41 +00:00
/// <summary>
/// Waits for v-blank and adds present requests to a queue.
/// Will probably cause latency.
/// Required to be supported by all compliant hardware.
/// </summary>
2022-02-23 05:14:32 +00:00
FIFO,
2023-09-19 20:19:41 +00:00
/// <summary>
/// Usually waits for v-blank, but if v-blank has passed since last update will update immediately.
/// May cause visible tearing.
/// </summary>
2022-02-23 05:14:32 +00:00
FIFORelaxed
}
2022-09-30 20:02:51 +00:00
}
2022-09-30 20:02:51 +00:00
/* Recreate all the enums in here so we don't need to explicitly
* reference the RefreshCS namespace when using MoonWorks.Graphics
*/
namespace MoonWorks.Graphics
{
2022-02-23 05:14:32 +00:00
public enum PrimitiveType
{
PointList,
LineList,
LineStrip,
TriangleList,
TriangleStrip
}
2022-02-23 05:14:32 +00:00
/// <summary>
/// Describes the operation that a render pass will use when loading a render target.
/// </summary>
public enum LoadOp
{
Load,
Clear,
DontCare
}
2022-02-23 05:14:32 +00:00
/// <summary>
/// Describes the operation that a render pass will use when storing a render target.
/// </summary>
public enum StoreOp
{
Store,
DontCare
}
2022-02-23 05:14:32 +00:00
[Flags]
public enum ClearOptionsFlags : uint
{
Color = 1,
Depth = 2,
Stencil = 4,
DepthStencil = Depth | Stencil,
All = Color | Depth | Stencil
}
2022-02-23 05:14:32 +00:00
public enum IndexElementSize
{
Sixteen,
ThirtyTwo
}
2022-02-23 05:14:32 +00:00
public enum TextureFormat
{
R8G8B8A8,
2022-03-02 06:57:10 +00:00
B8G8R8A8,
2022-02-23 05:14:32 +00:00
R5G6B5,
A1R5G5B5,
B4G4R4A4,
2022-09-13 20:58:09 +00:00
A2R10G10B10,
R16G16,
R16G16B16A16,
R8,
2022-02-23 05:14:32 +00:00
BC1,
BC2,
BC3,
2022-05-12 04:22:20 +00:00
BC7,
2022-02-23 05:14:32 +00:00
R8G8_SNORM,
R8G8B8A8_SNORM,
R16_SFLOAT,
R16G16_SFLOAT,
R16G16B16A16_SFLOAT,
2022-09-13 20:58:09 +00:00
R32_SFLOAT,
R32G32_SFLOAT,
R32G32B32A32_SFLOAT,
R8_UINT,
R8G8_UINT,
R8G8B8A8_UINT,
R16_UINT,
R16G16_UINT,
R16G16B16A16_UINT,
2022-02-23 05:14:32 +00:00
D16,
D32,
D16S8,
D32S8
}
2022-02-23 05:14:32 +00:00
[Flags]
public enum TextureUsageFlags : uint
{
Sampler = 1,
ColorTarget = 2,
2022-08-25 19:32:49 +00:00
DepthStencilTarget = 4,
Compute = 8
2022-02-23 05:14:32 +00:00
}
2022-02-23 05:14:32 +00:00
public enum SampleCount
{
One,
Two,
Four,
Eight
2022-02-23 05:14:32 +00:00
}
2022-02-23 05:14:32 +00:00
public enum CubeMapFace : uint
{
PositiveX,
NegativeX,
PositiveY,
NegativeY,
PositiveZ,
NegativeZ
}
2022-02-23 05:14:32 +00:00
[Flags]
public enum BufferUsageFlags : uint
{
Vertex = 1,
Index = 2,
2022-08-25 19:32:49 +00:00
Compute = 4,
Indirect = 8
2022-02-23 05:14:32 +00:00
}
2022-02-23 05:14:32 +00:00
public enum VertexElementFormat
{
2022-03-17 21:42:30 +00:00
UInt,
Float,
2022-02-23 05:14:32 +00:00
Vector2,
Vector3,
Vector4,
Color,
Byte4,
Short2,
Short4,
NormalizedShort2,
NormalizedShort4,
HalfVector2,
HalfVector4
}
2022-02-23 05:14:32 +00:00
public enum VertexInputRate
{
Vertex,
Instance
}
2022-02-23 05:14:32 +00:00
public enum FillMode
{
Fill,
2022-03-02 19:42:26 +00:00
Line
2022-02-23 05:14:32 +00:00
}
2022-02-23 05:14:32 +00:00
public enum CullMode
{
None,
Front,
2022-03-02 19:42:26 +00:00
Back
2022-02-23 05:14:32 +00:00
}
2022-02-23 05:14:32 +00:00
public enum FrontFace
{
CounterClockwise,
Clockwise
}
2022-02-23 05:14:32 +00:00
public enum CompareOp
{
Never,
Less,
Equal,
LessOrEqual,
Greater,
NotEqual,
GreaterOrEqual,
Always
}
2022-02-23 05:14:32 +00:00
public enum StencilOp
{
Keep,
Zero,
Replace,
IncrementAndClamp,
DecrementAndClamp,
Invert,
IncrementAndWrap,
DecrementAndWrap
}
2022-02-23 05:14:32 +00:00
public enum BlendOp
{
Add,
Subtract,
ReverseSubtract,
Min,
Max
}
2022-02-23 05:14:32 +00:00
public enum BlendFactor
{
Zero,
One,
SourceColor,
OneMinusSourceColor,
DestinationColor,
OneMinusDestinationColor,
SourceAlpha,
OneMinusSourceAlpha,
DestinationAlpha,
OneMinusDestinationAlpha,
ConstantColor,
OneMinusConstantColor,
SourceAlphaSaturate
2022-02-23 05:14:32 +00:00
}
2022-02-23 05:14:32 +00:00
[Flags]
public enum ColorComponentFlags : uint
{
R = 1,
G = 2,
B = 4,
A = 8,
2022-02-23 05:14:32 +00:00
RG = R | G,
RB = R | B,
RA = R | A,
GB = G | B,
GA = G | A,
BA = B | A,
2022-02-23 05:14:32 +00:00
RGB = R | G | B,
RGA = R | G | A,
GBA = G | B | A,
2022-02-23 05:14:32 +00:00
RGBA = R | G | B | A,
None = 0
}
2022-02-23 05:14:32 +00:00
public enum Filter
{
Nearest,
2022-03-02 19:42:26 +00:00
Linear
2022-02-23 05:14:32 +00:00
}
2022-02-23 05:14:32 +00:00
public enum SamplerMipmapMode
{
Nearest,
Linear
}
2022-02-23 05:14:32 +00:00
public enum SamplerAddressMode
{
Repeat,
MirroredRepeat,
ClampToEdge,
ClampToBorder
}
2022-02-23 05:14:32 +00:00
public enum BorderColor
{
FloatTransparentBlack,
IntTransparentBlack,
FloatOpaqueBlack,
IntOpaqueBlack,
FloatOpaqueWhite,
IntOpaqueWhite
}
public enum Backend
{
DontCare,
Vulkan,
PS5,
Invalid
}
}