2013-07-11 20:00:07 +02:00
/*****************************************************************************
* Enums . h *
* *
* XFX : : Graphics enumeration definition file *
* Copyright ( c ) XFX Team . All Rights Reserved *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2013-05-05 18:18:41 +02:00
# ifndef _XFX_GRAPHICS_ENUMS_
# define _XFX_GRAPHICS_ENUMS_
namespace XFX
{
namespace Graphics
{
2013-07-11 20:00:07 +02:00
/**
* Defines color blending factors .
*/
2013-05-05 18:18:41 +02:00
struct Blend
{
enum type
{
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by ( 1 , 1 , 1 , 1 ) .
*/
2013-05-05 18:18:41 +02:00
One = 0 ,
2013-07-11 20:00:07 +02:00
/** Each component of the color is multiplied by (0, 0, 0, 0).
*
*/
2013-05-05 18:18:41 +02:00
Zero = 1 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by the source color . This can be represented as ( Rs , Gs , Bs , As ) , where R , G , B , and A respectively stand for the red , green , blue , and alpha source values .
*/
2013-05-05 18:18:41 +02:00
SourceColor = 2 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by the inverse of the source color . This can be represented as ( 1 ? Rs , 1 ? Gs , 1 ? Bs , 1 ? As ) where R , G , B , and A respectively stand for the red , green , blue , and alpha destination values .
*/
2013-05-05 18:18:41 +02:00
InversourceColor = 3 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by the alpha value of the source . This can be represented as ( As , As , As , As ) , where As is the alpha source value .
*/
2013-05-05 18:18:41 +02:00
SourceAlpha = 4 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by the inverse of the alpha value of the source . This can be represented as ( 1 ? As , 1 ? As , 1 ? As , 1 ? As ) , where As is the alpha destination value .
*/
2013-05-05 18:18:41 +02:00
InverseSourceAlpha = 5 ,
2013-07-11 20:00:07 +02:00
/**
* Each component color is multiplied by the destination color . This can be represented as ( Rd , Gd , Bd , Ad ) , where R , G , B , and A respectively stand for red , green , blue , and alpha destination values .
*/
2013-05-05 18:18:41 +02:00
DestinationColor = 6 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by the inverse of the destination color . This can be represented as ( 1 ? Rd , 1 ? Gd , 1 ? Bd , 1 ? Ad ) , where Rd , Gd , Bd , and Ad respectively stand for the red , green , blue , and alpha destination values .
*/
2013-05-05 18:18:41 +02:00
InverseDestinationColor = 7 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by the alpha value of the destination . This can be represented as ( Ad , Ad , Ad , Ad ) , where Ad is the destination alpha value .
*/
2013-05-05 18:18:41 +02:00
DestinationAlpha = 8 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by the inverse of the alpha value of the destination . This can be represented as ( 1 ? Ad , 1 ? Ad , 1 ? Ad , 1 ? Ad ) , where Ad is the alpha destination value .
*/
2013-05-05 18:18:41 +02:00
InverseDestinationAlpha = 9 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by a constant set in BlendFactor .
*/
2013-05-05 18:18:41 +02:00
BlendFactor = 10 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by the inverse of a constant set in BlendFactor .
*/
2013-05-05 18:18:41 +02:00
InverseBlendFactor = 11 ,
2013-07-11 20:00:07 +02:00
/**
* Each component of the color is multiplied by either the alpha of the source color , or the inverse of the alpha of the source color , whichever is greater . This can be represented as ( f , f , f , 1 ) , where f = min ( A , 1 ? Ad ) .
*/
2013-05-05 18:18:41 +02:00
SourceAlphaSaturation = 12
} ;
} ;
2013-07-11 20:00:07 +02:00
/**
* Defines how to combine a source color with the destination color already on the render target for color blending .
*/
2013-05-05 18:18:41 +02:00
struct BlendFunction
{
enum type
{
2013-07-11 20:00:07 +02:00
/**
* The result is the destination added to the source . Result = ( Source Color * Source Blend ) + ( Destination Color * Destination Blend )
*/
2013-05-05 18:18:41 +02:00
Add ,
2013-07-11 20:00:07 +02:00
/**
* The result is the destination subtracted from the source . Result = ( Source Color * Source Blend ) ? ( Destination Color * Destination Blend )
*/
2013-05-05 18:18:41 +02:00
Subtract ,
2013-07-11 20:00:07 +02:00
/**
* The result is the source subtracted from the destination . Result = ( Destination Color * Destination Blend ) ? ( Source Color * Source Blend )
*/
2013-05-05 18:18:41 +02:00
ReverseSubtract ,
2013-07-11 20:00:07 +02:00
/**
* The result is the minimum of the source and destination . Result = min ( ( Source Color * Source Blend ) , ( Destination Color * Destination Blend ) )
*/
2013-05-05 18:18:41 +02:00
Min ,
2013-07-11 20:00:07 +02:00
/**
* The result is the maximum of the source and destination . Result = max ( ( Source Color * Source Blend ) , ( Destination Color * Destination Blend ) )
*/
2013-05-05 18:18:41 +02:00
Max
} ;
} ;
2013-07-11 20:00:07 +02:00
/**
* Specifies Special Usage of the buffer contents .
*/
2013-05-05 18:18:41 +02:00
struct BufferUsage
{
enum type
{
2013-07-11 20:00:07 +02:00
/**
* None .
*/
2013-05-05 18:18:41 +02:00
None = 0 ,
Points = 0x40 ,
2013-07-11 20:00:07 +02:00
/**
* Indicates that the application only writes to the vertex buffer . If specified , the driver chooses the best memory location for efficient writing and rendering . Attempts to read from a write - only vertex buffer fail .
*/
2013-05-05 18:18:41 +02:00
WriteOnly = 8
} ;
} ;
2013-07-11 20:00:07 +02:00
/**
* Specifies the buffer to use when calling GraphicsDevice : : Clear .
*/
2013-05-05 18:18:41 +02:00
struct ClearOptions
{
enum type
{
2013-07-11 20:00:07 +02:00
/**
* A depth buffer .
*/
2013-05-05 18:18:41 +02:00
Depth = 2 ,
2013-07-11 20:00:07 +02:00
/**
* A stencil buffer .
*/
2013-05-05 18:18:41 +02:00
Stencil = 4 ,
2013-07-11 20:00:07 +02:00
/**
* A render target .
*/
2013-05-05 18:18:41 +02:00
Target = 1
} ;
} ;
2013-07-11 20:00:07 +02:00
/**
* Defines the color channels that can be chosen for a per - channel write to a render target color buffer .
*/
2013-05-05 18:18:41 +02:00
struct ColorWriteChannels
{
enum type
{
2013-07-11 20:00:07 +02:00
/**
* All buffer channels .
*/
2013-05-05 18:18:41 +02:00
All = 15 ,
2013-07-11 20:00:07 +02:00
/**
* Alpha channel of a buffer .
*/
2013-05-05 18:18:41 +02:00
Alpha = 8 ,
2013-07-11 20:00:07 +02:00
/**
* Blue channel of a buffer .
*/
2013-05-05 18:18:41 +02:00
Blue = 4 ,
2013-07-11 20:00:07 +02:00
/**
* Green channel of a buffer .
*/
2013-05-05 18:18:41 +02:00
Green = 2 ,
2013-07-11 20:00:07 +02:00
/**
* No channel selected .
*/
2013-05-05 18:18:41 +02:00
None = 0 ,
2013-07-11 20:00:07 +02:00
/**
* Red channel of a buffer .
*/
2013-05-05 18:18:41 +02:00
Red = 1
} ;
} ;
2013-07-11 20:00:07 +02:00
/**
* Defines comparison functions that can be chosen for alpha , stencil , or depth - buffer tests .
*/
2013-05-05 18:18:41 +02:00
struct CompareFunction
{
enum type
{
2013-07-11 20:00:07 +02:00
/**
* Always fail the test .
*/
2013-05-05 18:18:41 +02:00
Never = 1 ,
2013-07-11 20:00:07 +02:00
/**
* Accept the new pixel if its value is less than the value of the current pixel .
*/
2013-05-05 18:18:41 +02:00
Less = 2 ,
2013-07-11 20:00:07 +02:00
/**
* Accept the new pixel if its value is equal to the value of the current pixel .
*/
2013-05-05 18:18:41 +02:00
Equal = 3 ,
2013-07-11 20:00:07 +02:00
/**
* Accept the new pixel if its value is less than or equal to the value of the current pixel .
*/
2013-05-05 18:18:41 +02:00
LessEqual = 4 ,
2013-07-11 20:00:07 +02:00
/**
* Accept the new pixel if its value is greater than the value of the current pixel .
*/
2013-05-05 18:18:41 +02:00
Greater = 5 ,
2013-07-11 20:00:07 +02:00
/**
* Accept the new pixel if its value does not equal the value of the current pixel .
*/
2013-05-05 18:18:41 +02:00
NotEqual = 6 ,
2013-07-11 20:00:07 +02:00
/**
* Accept the new pixel if its value is greater than or equal to the value of the current pixel .
*/
2013-05-05 18:18:41 +02:00
GreaterEqual = 7 ,
2013-07-11 20:00:07 +02:00
/**
* Always pass the test .
*/
2013-05-05 18:18:41 +02:00
Always = 8
} ;
} ;
// Defines the faces of a cube map in the TextureCube class type.
struct CubeMapFace
{
enum type
{
NegativeX = 1 ,
NegativeY = 3 ,
NegativeZ = 5 ,
PositiveX = 0 ,
PositiveY = 2 ,
PositiveZ = 4
} ;
} ;
// Defines winding orders that may be used to identify back faces for culling.
struct CullMode
{
enum type
{
None ,
CullClockwiseFace ,
CullCounterClockwiseFace
} ;
} ;
// Defines the format of data in a depth buffer.
struct DepthFormat
{
enum type
{
None ,
Depth16 ,
Depth24 ,
Depth24Stencil8 ,
} ;
} ;
// Defines classes that can be used for effect parameters or shader constants.
struct EffectParameterClass
{
enum type
{
Scalar ,
Vector ,
Matrix ,
Object ,
Struct ,
} ;
} ;
// Defines types that can be used for effect parameters or shader constants.
struct EffectParameterType
{
enum type
{
// Parameter is a void pointer.
Void ,
// Parameter is a Boolean. Any nonzero value passed in will be mapped to 1 (TRUE) before being written into the constant table; otherwise, the value will be set to 0 in the constant table.
Bool ,
// Parameter is an integer. Any floating-point values passed in will be rounded off (to zero decimal places) before being written into the constant table.
Int32 ,
// Parameter is a floating-point number.
Single ,
// Parameter is a string.
String ,
// Parameter is a texture.
Texture ,
// Parameter is a 1D texture.
Texture1D ,
// Parameter is a 2D texture.
Texture2D ,
// Parameter is a 3D texture.
Texture3D ,
// Parameter is a cube texture.
TextureCube
} ;
} ;
// Describes options for filling the vertices and lines that define a primitive.
struct FillMode
{
enum type
{
Point = 1 ,
Solid = 3 ,
WireFrame = 2
} ;
} ;
// Describes the status of the device.
struct GraphicsDeviceStatus
{
enum type
{
Lost = 1 ,
Normal = 0 ,
NotReset = 2
} ;
} ;
// Defines supported image file formats that may be used for textures.
struct ImageFileFormat
{
enum type
{
Bmp = 0 ,
Dds = 4 ,
Dib = 6 ,
Hdr = 7 ,
Jpg = 1 ,
Pfm = 8 ,
Png = 3 ,
Ppm = 5 ,
Tga = 2
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines the size of an element of an index buffer .
*/
2013-05-05 18:18:41 +02:00
struct IndexElementSize
{
enum type
{
SixteenBits ,
ThirtyTwoBits
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines flags that describe the relationship between the adapter refresh rate and the rate at which GraphicsDevice . Present operations are completed .
*/
2013-05-05 18:18:41 +02:00
struct PresentInterval
{
enum type
{
Default = 0 ,
Immediate = 0x80000000 ,
One = 1 ,
Two = 2
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines how data in a vertex stream is interpreted during a draw call .
*/
2013-05-05 18:18:41 +02:00
struct PrimitiveType
{
enum type
{
LineList = 2 ,
LineStrip = 4 ,
PointList = 1 ,
TriangleList = 5 ,
TriangleStrip = 6
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Determines how render target data is used once a new render target is set .
*/
2013-05-05 18:18:41 +02:00
struct RenderTargetUsage
{
enum type
{
DiscardContents ,
PlatformContents ,
PreserveContents
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Describes whether existing buffer data will be overwritten or discarded during a SetData operation .
*/
2013-05-05 18:18:41 +02:00
struct SetDataOptions
{
enum type
{
Discard = 8192 ,
None = 0 ,
NoOverwrite = 4096
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines sprite rotation options .
*/
2013-05-05 18:18:41 +02:00
struct SpriteEffects
{
enum type
{
2013-08-13 20:04:25 +02:00
/**
* Rotate 180 degrees about the Y axis before rendering .
*/
FlipHorizontally = 1 ,
/**
* Rotate 180 degrees about the X axis before rendering .
*/
FlipVertically = 0x100 ,
/**
* No rotations specified .
*/
None = 0
2013-05-05 18:18:41 +02:00
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines sprite sort - rendering options .
*/
2013-05-05 18:18:41 +02:00
struct SpriteSortMode
{
enum type
{
BackToFront = 3 ,
Deferred = 1 ,
FrontToBack = 4 ,
Immediate = 0 ,
Texture = 2
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines stencil buffer operations .
*/
2013-05-05 18:18:41 +02:00
struct StencilOperation
{
enum type
{
Decrement = 8 ,
DecrementSaturation = 5 ,
Increment = 7 ,
IncrementSaturation = 4 ,
Invert = 6 ,
Keep = 1 ,
Replace = 3 ,
Zero = 2
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines various types of surface formats .
*/
2013-05-05 18:18:41 +02:00
struct SurfaceFormat
{
enum type
{
Alpha8 = 15 ,
Bgr565 = 9 ,
Bgra4444 = 12 ,
Bgra5551 = 10 ,
Color = 1 ,
Dxt1 = 28 ,
Dxt2 = 29 ,
Dxt3 = 30 ,
Dxt4 = 31 ,
Dxt5 = 32 ,
HalfSingle = 25 ,
HalfVector2 = 26 ,
HalfVector4 = 27 ,
HdrBlendable = 19 ,
NormalizedByte2 = 18 ,
NormalizedByte4 = 19 ,
Rg32 = 7 ,
Rgba1010102 = 6 ,
Rgba64 = 8 ,
Single = 22 ,
Vector2 = 23 ,
Vector4 = 24 ,
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines constants that describe supported texture - addressing modes .
*/
2013-05-05 18:18:41 +02:00
struct TextureAddressMode
{
enum type
{
Clamp = 3 ,
Mirror = 2 ,
Wrap = 1
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines how a texture will be filtered as it is minified for each mipmap level .
*/
2013-05-05 18:18:41 +02:00
struct TextureFilter
{
enum type
{
2013-08-13 20:04:25 +02:00
/**
* Use linear filtering .
*/
2013-05-05 18:18:41 +02:00
Linear ,
2013-08-13 20:04:25 +02:00
/**
* Use point filtering .
*/
2013-05-05 18:18:41 +02:00
Point ,
2013-08-13 20:04:25 +02:00
/**
* Use anisotropic filtering .
*/
2013-05-05 18:18:41 +02:00
Anisotropic ,
2013-08-13 20:04:25 +02:00
/**
* Use linear filtering to shrink or expand , and point filtering between mipmap levels ( mip ) .
*/
2013-05-05 18:18:41 +02:00
LinearMipPoint ,
2013-08-13 20:04:25 +02:00
/**
* Use point filtering to shrink ( minify ) or expand ( magnify ) , and linear filtering between mipmap levels .
*/
2013-05-05 18:18:41 +02:00
PointMipLinear ,
2013-08-13 20:04:25 +02:00
/**
* Use linear filtering to shrink , point filtering to expand , and linear filtering between mipmap levels .
*/
2013-05-05 18:18:41 +02:00
MinLinearMagPointMipLinear ,
2013-08-13 20:04:25 +02:00
/**
* Use linear filtering to shrink , point filtering to expand , and point filtering between mipmap levels .
*/
2013-05-05 18:18:41 +02:00
MinLinearMagPointMipPoint ,
2013-08-13 20:04:25 +02:00
/**
* Use point filtering to shrink , linear filtering to expand , and linear filtering between mipmap levels .
*/
2013-05-05 18:18:41 +02:00
MinPointMagLinearMipLinear ,
2013-08-13 20:04:25 +02:00
/**
* Use point filtering to shrink , linear filtering to expand , and point filtering between mipmap levels .
*/
2013-05-05 18:18:41 +02:00
MinPointMagLinearMipPoint
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines vertex element formats .
*/
2013-05-05 18:18:41 +02:00
struct VertexElementFormat
{
enum type
{
Byte4 ,
Color ,
HalfVector2 ,
HalfVector4 ,
NormalizedShort2 ,
NormalizedShort4 ,
Short2 ,
Short4 ,
Single ,
Vector2 ,
Vector3 ,
Vector4
} ;
} ;
2013-08-13 20:04:25 +02:00
/**
* Defines usage for vertex elements .
*/
2013-05-05 18:18:41 +02:00
struct VertexElementUsage
{
enum type
{
Binormal ,
BlendIndices ,
BlendWeight ,
Color ,
Depth ,
Fog ,
Normal ,
PointSize ,
Position ,
Sample ,
Tangent ,
TessellateFactor ,
TextureCoordinate
} ;
} ;
// Lots of typedefs, but there was no other way to make these typesafe enum hacks look good.
2013-08-13 20:04:25 +02:00
typedef Blend : : type Blend_t ;
typedef BlendFunction : : type BlendFunction_t ;
2013-05-05 18:18:41 +02:00
typedef BufferUsage : : type BufferUsage_t ;
typedef ClearOptions : : type ClearOptions_t ;
typedef ColorWriteChannels : : type ColorWriteChannels_t ;
typedef CompareFunction : : type CompareFunction_t ;
typedef CubeMapFace : : type CubeMapFace_t ;
2013-08-13 20:04:25 +02:00
typedef CullMode : : type CullMode_t ;
2013-05-05 18:18:41 +02:00
typedef DepthFormat : : type DepthFormat_t ;
typedef EffectParameterClass : : type EffectParameterClass_t ;
typedef EffectParameterType : : type EffectParameterType_t ;
2013-08-13 20:04:25 +02:00
typedef FillMode : : type FillMode_t ;
2013-05-05 18:18:41 +02:00
typedef GraphicsDeviceStatus : : type GraphicsDeviceStatus_t ;
typedef ImageFileFormat : : type ImageFileFormat_t ;
typedef IndexElementSize : : type IndexElementSize_t ;
typedef PresentInterval : : type PresentInterval_t ;
2013-08-13 20:04:25 +02:00
typedef PrimitiveType : : type PrimitiveType_t ;
2013-05-05 18:18:41 +02:00
typedef RenderTargetUsage : : type RenderTargetUsage_t ;
typedef SetDataOptions : : type SetDataOptions_t ;
2013-08-13 20:04:25 +02:00
typedef SpriteEffects : : type SpriteEffects_t ;
2013-05-05 18:18:41 +02:00
typedef SpriteSortMode : : type SpriteSortMode_t ;
typedef StencilOperation : : type StencilOperation_t ;
2013-08-13 20:04:25 +02:00
typedef SurfaceFormat : : type SurfaceFormat_t ;
2013-05-05 18:18:41 +02:00
typedef TextureAddressMode : : type TextureAddressMode_t ;
2013-08-13 20:04:25 +02:00
typedef TextureFilter : : type TextureFilter_t ;
2013-05-05 18:18:41 +02:00
typedef VertexElementFormat : : type VertexElementFormat_t ; // Defines vertex element formats.
typedef VertexElementUsage : : type VertexElementUsage_t ; // Defines usage for vertex elements.
}
}
# endif //_XFX_GRAPHICS_ENUMS_