gfxEnums.h

Engine/source/gfx/gfxEnums.h

More...

Public Defines

define
define
define
GFX_UNINIT_VAL() 0xDECAFBAD
define
GFX_UNSUPPORTED_VAL() 0xDEADBEEF

Public Enumerations

enum
GFXAdapterType {
  OpenGL = 0
  Direct3D11 
  NullDevice 
  GFXAdapterType_Count 
}

Constants that name each GFXDevice type.

enum
GFXBitmapFlip {
  GFXBitmapFlip_None = 0
  GFXBitmapFlip_X = 1 << 0
  GFXBitmapFlip_Y = 1 << 1
  GFXBitmapFlip_XY = GFXBitmapFlip_X | GFXBitmapFlip_Y
}
enum
GFXBlend {
  GFXBlend_FIRST = 0
  GFXBlendZero = 0
  GFXBlendOne 
  GFXBlendSrcColor 
  GFXBlendInvSrcColor 
  GFXBlendSrcAlpha 
  GFXBlendInvSrcAlpha 
  GFXBlendDestAlpha 
  GFXBlendInvDestAlpha 
  GFXBlendDestColor 
  GFXBlendInvDestColor 
  GFXBlendSrcAlphaSat 
  GFXBlend_COUNT 
}

The supported blend modes.

enum
GFXBlendOp {
  GFXBlendOp_FIRST = 0
  GFXBlendOpAdd = 0
  GFXBlendOpSubtract 
  GFXBlendOpRevSubtract 
  GFXBlendOpMin 
  GFXBlendOpMax 
  GFXBlendOp_COUNT 
}
enum
GFXBufferType {
  GFXBufferTypeStatic 
  GFXBufferTypeDynamic 
  GFXBufferTypeVolatile 
  GFXBufferTypeImmutable 
  GFXBufferType_COUNT 
}
enum
GFXClearFlags {
  GFXClearTarget = 1 << 0
  GFXClearZBuffer = 1 << 1
  GFXClearStencil = 1 << 2
}
enum
GFXCmpFunc {
  GFXCmp_FIRST = 0
  GFXCmpNever = 0
  GFXCmpLess 
  GFXCmpEqual 
  GFXCmpLessEqual 
  GFXCmpGreater 
  GFXCmpNotEqual 
  GFXCmpGreaterEqual 
  GFXCmpAlways 
  GFXCmp_COUNT 
}
enum
GFXCullMode {
  GFXCull_FIRST = 0
  GFXCullNone = 0
  GFXCullCW 
  GFXCullCCW 
  GFXCull_COUNT 
}
enum
GFXDeclType {
  GFXDeclType_FIRST = 0
  GFXDeclType_Float = 0
  GFXDeclType_Float2 
  GFXDeclType_Float3 
  GFXDeclType_Float4 
  GFXDeclType_Color 
  GFXDeclType_UByte4 
  GFXDeclType_COUNT 
}

Defines a vertex declaration type.

enum
GFXFillMode {
  GFXFill_FIRST = 1
  GFXFillPoint = 1
  GFXFillWireframe 
  GFXFillSolid 
  GFXFill_COUNT 
}
enum
GFXFormat {
  GFXFormat_FIRST = 0
  GFXFormatA8 = 0
  GFXFormatL8 
  GFXFormatA4L4 
  GFXFormatR5G6B5 
  GFXFormatR5G5B5A1 
  GFXFormatR5G5B5X1 
  GFXFormatA8L8 
  GFXFormatL16 
  GFXFormatR16F 
  GFXFormatD16 
  GFXFormatR8G8B8 
  GFXFormatR8G8B8_SRGB 
  GFXFormatR8G8B8A8 
  GFXFormatR8G8B8X8 
  GFXFormatB8G8R8A8 
  GFXFormatR8G8B8A8_SRGB 
  GFXFormatR32F 
  GFXFormatR16G16 
  GFXFormatR16G16F 
  GFXFormatR10G10B10A2 
  GFXFormatR11G11B10 
  GFXFormatD32 
  GFXFormatD24X8 
  GFXFormatD24S8 
  GFXFormatD24FS8 
  GFXFormatR8G8B8A8_LINEAR_FORCE 
  GFXFormatR16G16B16A16 
  GFXFormatR16G16B16A16F 
  GFXFormatR32G32B32A32F 
  GFXFormatBC1 
  GFXFormatBC2 
  GFXFormatBC3 
  GFXFormatBC4 
  GFXFormatBC5 
  GFXFormatBC1_SRGB 
  GFXFormatBC2_SRGB 
  GFXFormatBC3_SRGB 
  GFXFormat_COUNT 
  GFXFormat_8BIT = GFXFormatA8
  GFXFormat_16BIT = GFXFormatR5G6B5
  GFXFormat_24BIT = GFXFormatR8G8B8
  GFXFormat_32BIT = GFXFormatR8G8B8A8
  GFXFormat_64BIT = GFXFormatR16G16B16A16
  GFXFormat_128BIT = GFXFormatR32G32B32A32F
  GFXFormat_UNKNOWNSIZE = GFXFormatBC1
}
enum
GFXMatrixType {
  GFXMatrixWorld = 256
  GFXMatrixView = 2
  GFXMatrixProjection = 3
  GFXMatrixTexture = 16
  GFXMatrixTexture0 = 16
  GFXMatrixTexture1 = 17
  GFXMatrixTexture2 = 18
  GFXMatrixTexture3 = 19
  GFXMatrixTexture4 = 20
  GFXMatrixTexture5 = 21
  GFXMatrixTexture6 = 22
  GFXMatrixTexture7 = 23
}
enum
GFXPrimitiveType {
  GFXPT_FIRST = 0
  GFXPointList = 0
  GFXLineList 
  GFXLineStrip 
  GFXTriangleList 
  GFXTriangleStrip 
  GFXPT_COUNT 
}
enum
GFXShaderConstType {
  GFXSCT_Float 
  GFXSCT_Float2 
  GFXSCT_Float3 
  GFXSCT_Float4 
  GFXSCT_Float2x2 
  GFXSCT_Float3x3 
  GFXSCT_Float3x4 
  GFXSCT_Float4x3 
  GFXSCT_Float4x4 
  GFXSCT_Int 
  GFXSCT_Int2 
  GFXSCT_Int3 
  GFXSCT_Int4 
  GFXSCT_Sampler 
  GFXSCT_SamplerCube 
  GFXSCT_SamplerCubeArray 
  GFXSCT_SamplerTextureArray 
}
enum
GFXStencilOp {
  GFXStencilOp_FIRST = 0
  GFXStencilOpKeep = 0
  GFXStencilOpZero 
  GFXStencilOpReplace 
  GFXStencilOpIncrSat 
  GFXStencilOpDecrSat 
  GFXStencilOpInvert 
  GFXStencilOpIncr 
  GFXStencilOpDecr 
  GFXStencilOp_COUNT 
}
enum
GFXTexCallbackCode {
  GFXZombify 
  GFXResurrect 
}
enum
GFXTextureAddressMode {
  GFXAddress_FIRST = 0
  GFXAddressWrap = 0
  GFXAddressMirror 
  GFXAddressClamp 
  GFXAddressBorder 
  GFXAddressMirrorOnce 
  GFXAddress_COUNT 
}
enum
GFXTextureFilterType {
  GFXTextureFilter_FIRST = 0
  GFXTextureFilterNone = 0
  GFXTextureFilterPoint 
  GFXTextureFilterLinear 
  GFXTextureFilterAnisotropic 
  GFXTextureFilter_COUNT 
}

Public Functions

Returns the byte size of the pixel for non-compressed formats.

Detailed Description

Public Defines

GFX_MAX_DYNAMIC_INDICES() (8192*4)
GFX_MAX_DYNAMIC_VERTS() (8192*2)
GFX_TEXTURE_STAGE_COUNT() 16
GFX_UNINIT_VAL() 0xDECAFBAD
GFX_UNSUPPORTED_VAL() 0xDEADBEEF
GFX_WORLD_STACK_MAX() 24

Public Enumerations

GFXAdapterType

Enumerator

OpenGL = 0
Direct3D11
NullDevice
GFXAdapterType_Count

Constants that name each GFXDevice type.

Any new GFXDevice subclass must be added to this enum. A string representing its name must also be added to GFXInit::getAdapterNameFromType().

GFXBitmapFlip

Enumerator

GFXBitmapFlip_None = 0
GFXBitmapFlip_X = 1 << 0
GFXBitmapFlip_Y = 1 << 1
GFXBitmapFlip_XY = GFXBitmapFlip_X | GFXBitmapFlip_Y
GFXBlend

Enumerator

GFXBlend_FIRST = 0
GFXBlendZero = 0
GFXBlendOne

(0, 0, 0, 0)

GFXBlendSrcColor

(1, 1, 1, 1)

GFXBlendInvSrcColor

(Rs, Gs, Bs, As)

GFXBlendSrcAlpha

(1 - Rs, 1 - Gs, 1 - Bs, 1 - As)

GFXBlendInvSrcAlpha

(As, As, As, As)

GFXBlendDestAlpha

( 1 - As, 1 - As, 1 - As, 1 - As)

GFXBlendInvDestAlpha

(Ad Ad Ad Ad)

GFXBlendDestColor

(1 - Ad 1 - Ad 1 - Ad 1 - Ad)

GFXBlendInvDestColor

(Rd, Gd, Bd, Ad)

GFXBlendSrcAlphaSat

(1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad)

GFXBlend_COUNT

(f, f, f, 1) where f = min(As, 1 - Ad)

The supported blend modes.

GFXBlendOp

Enumerator

GFXBlendOp_FIRST = 0
GFXBlendOpAdd = 0
GFXBlendOpSubtract
GFXBlendOpRevSubtract
GFXBlendOpMin
GFXBlendOpMax
GFXBlendOp_COUNT
GFXBufferType

Enumerator

GFXBufferTypeStatic

Static vertex buffers are created and rarely updated.

Updating might incur a performance penalty. Resizing a static vertex buffer is not allowed.

GFXBufferTypeDynamic

Dynamic vertex buffers are meant for vertices that can be changed often.

Vertices written into dynamic vertex buffers will remain valid until the dynamic vertex buffer is released. Resizing a dynamic vertex buffer is not allowed.

GFXBufferTypeVolatile

Volatile vertex or index buffers are meant for vertices or indices that are essentially only used once.

They can be resized without any performance penalty.

GFXBufferTypeImmutable

Immutable buffers must specify the data when creating the buffer. Cannot be modified.

GFXBufferType_COUNT

Number of buffer types.

GFXClearFlags

Enumerator

GFXClearTarget = 1 << 0
GFXClearZBuffer = 1 << 1
GFXClearStencil = 1 << 2
GFXCmpFunc

Enumerator

GFXCmp_FIRST = 0
GFXCmpNever = 0
GFXCmpLess
GFXCmpEqual
GFXCmpLessEqual
GFXCmpGreater
GFXCmpNotEqual
GFXCmpGreaterEqual
GFXCmpAlways
GFXCmp_COUNT
GFXCullMode

Enumerator

GFXCull_FIRST = 0
GFXCullNone = 0
GFXCullCW
GFXCullCCW
GFXCull_COUNT
GFXDeclType

Enumerator

GFXDeclType_FIRST = 0
GFXDeclType_Float = 0

A single component F32.

GFXDeclType_Float2

A two-component F32.

GFXDeclType_Float3

A three-component F32.

GFXDeclType_Float4

A four-component F32.

GFXDeclType_Color

A four-component, packed, unsigned bytes mapped to 0 to 1 range.

GFXDeclType_UByte4

Four-component, packed, unsigned bytes ranged 0-255.

GFXDeclType_COUNT

The count of total GFXDeclTypes.

Defines a vertex declaration type.

GFXFillMode

Enumerator

GFXFill_FIRST = 1
GFXFillPoint = 1
GFXFillWireframe
GFXFillSolid
GFXFill_COUNT
GFXFormat

Enumerator

GFXFormat_FIRST = 0
GFXFormatA8 = 0
GFXFormatL8
GFXFormatA4L4
GFXFormatR5G6B5
GFXFormatR5G5B5A1
GFXFormatR5G5B5X1
GFXFormatA8L8
GFXFormatL16
GFXFormatR16F
GFXFormatD16
GFXFormatR8G8B8
GFXFormatR8G8B8_SRGB
GFXFormatR8G8B8A8
GFXFormatR8G8B8X8
GFXFormatB8G8R8A8
GFXFormatR8G8B8A8_SRGB
GFXFormatR32F
GFXFormatR16G16
GFXFormatR16G16F
GFXFormatR10G10B10A2
GFXFormatR11G11B10
GFXFormatD32
GFXFormatD24X8
GFXFormatD24S8
GFXFormatD24FS8
GFXFormatR8G8B8A8_LINEAR_FORCE
GFXFormatR16G16B16A16
GFXFormatR16G16B16A16F
GFXFormatR32G32B32A32F
GFXFormatBC1
GFXFormatBC2
GFXFormatBC3
GFXFormatBC4
GFXFormatBC5
GFXFormatBC1_SRGB
GFXFormatBC2_SRGB
GFXFormatBC3_SRGB
GFXFormat_COUNT
GFXFormat_8BIT = GFXFormatA8
GFXFormat_16BIT = GFXFormatR5G6B5
GFXFormat_24BIT = GFXFormatR8G8B8
GFXFormat_32BIT = GFXFormatR8G8B8A8
GFXFormat_64BIT = GFXFormatR16G16B16A16
GFXFormat_128BIT = GFXFormatR32G32B32A32F
GFXFormat_UNKNOWNSIZE = GFXFormatBC1
GFXMatrixType

Enumerator

GFXMatrixWorld = 256
GFXMatrixView = 2
GFXMatrixProjection = 3
GFXMatrixTexture = 16
GFXMatrixTexture0 = 16
GFXMatrixTexture1 = 17
GFXMatrixTexture2 = 18
GFXMatrixTexture3 = 19
GFXMatrixTexture4 = 20
GFXMatrixTexture5 = 21
GFXMatrixTexture6 = 22
GFXMatrixTexture7 = 23
GFXPrimitiveType

Enumerator

GFXPT_FIRST = 0
GFXPointList = 0
GFXLineList
GFXLineStrip
GFXTriangleList
GFXTriangleStrip
GFXPT_COUNT
GFXShaderConstType

Enumerator

GFXSCT_Float

GFX"S"hader"C"onstant"T"ype.

GFXSCT_Float2
GFXSCT_Float3
GFXSCT_Float4
GFXSCT_Float2x2
GFXSCT_Float3x3
GFXSCT_Float3x4
GFXSCT_Float4x3
GFXSCT_Float4x4
GFXSCT_Int
GFXSCT_Int2
GFXSCT_Int3
GFXSCT_Int4
GFXSCT_Sampler
GFXSCT_SamplerCube
GFXSCT_SamplerCubeArray
GFXSCT_SamplerTextureArray
GFXStencilOp

Enumerator

GFXStencilOp_FIRST = 0
GFXStencilOpKeep = 0
GFXStencilOpZero
GFXStencilOpReplace
GFXStencilOpIncrSat
GFXStencilOpDecrSat
GFXStencilOpInvert
GFXStencilOpIncr
GFXStencilOpDecr
GFXStencilOp_COUNT
GFXTexCallbackCode

Enumerator

GFXZombify
GFXResurrect
GFXTextureAddressMode

Enumerator

GFXAddress_FIRST = 0
GFXAddressWrap = 0
GFXAddressMirror
GFXAddressClamp
GFXAddressBorder
GFXAddressMirrorOnce
GFXAddress_COUNT
GFXTextureFilterType

Enumerator

GFXTextureFilter_FIRST = 0
GFXTextureFilterNone = 0
GFXTextureFilterPoint
GFXTextureFilterLinear
GFXTextureFilterAnisotropic
GFXTextureFilter_COUNT

Public Functions

GFXFormat_getByteSize(GFXFormat format)

Returns the byte size of the pixel for non-compressed formats.

  1
  2//-----------------------------------------------------------------------------
  3// Copyright (c) 2012 GarageGames, LLC
  4//
  5// Permission is hereby granted, free of charge, to any person obtaining a copy
  6// of this software and associated documentation files (the "Software"), to
  7// deal in the Software without restriction, including without limitation the
  8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  9// sell copies of the Software, and to permit persons to whom the Software is
 10// furnished to do so, subject to the following conditions:
 11//
 12// The above copyright notice and this permission notice shall be included in
 13// all copies or substantial portions of the Software.
 14//
 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 21// IN THE SOFTWARE.
 22//-----------------------------------------------------------------------------
 23
 24#ifndef _GFXENUMS_H_
 25#define _GFXENUMS_H_
 26
 27#include "core/util/fourcc.h"
 28
 29// These are for the enum translation. It will help with porting to other platforms
 30// and API's.
 31#define GFX_UNSUPPORTED_VAL 0xDEADBEEF
 32#define GFX_UNINIT_VAL 0xDECAFBAD
 33
 34// Adjust these pools to your app's needs.  Be aware dynamic vertices are much more
 35// expensive than static vertices. These are in gfxEnums because they should be
 36// consistant across all APIs/platforms so that the dynamic buffer performance
 37// and behavior is also consistant. -patw
 38#define GFX_MAX_DYNAMIC_VERTS   (8192*2)
 39#define GFX_MAX_DYNAMIC_INDICES (8192*4)
 40
 41#define GFX_WORLD_STACK_MAX 24
 42
 43#define GFX_TEXTURE_STAGE_COUNT 16
 44
 45enum GFXBufferType
 46{
 47   GFXBufferTypeStatic,    ///< Static vertex buffers are created and rarely updated.
 48                           ///< Updating might incur a performance penalty.  Resizing a static vertex buffer is not
 49                           ///< allowed.
 50   GFXBufferTypeDynamic,   ///< Dynamic vertex buffers are meant for vertices that can be changed
 51                           ///< often.  Vertices written into dynamic vertex buffers will remain valid
 52                           ///< until the dynamic vertex buffer is released.  Resizing a dynamic vertex buffer is not
 53                           ///< allowed.
 54   GFXBufferTypeVolatile,  ///< Volatile vertex or index buffers are meant for vertices or indices that are essentially
 55                           ///< only used once.  They can be resized without any performance penalty.
 56
 57   GFXBufferTypeImmutable, ///< Immutable buffers must specify the data when creating the buffer. Cannot be modified.
 58
 59   GFXBufferType_COUNT     ///< Number of buffer types.
 60};
 61
 62enum GFXTexCallbackCode
 63{
 64   GFXZombify,
 65   GFXResurrect,
 66};
 67
 68enum GFXPrimitiveType 
 69{
 70   GFXPT_FIRST = 0,
 71   GFXPointList = 0,
 72   GFXLineList,
 73   GFXLineStrip,
 74   GFXTriangleList,
 75   GFXTriangleStrip,
 76   GFXPT_COUNT
 77};
 78
 79enum GFXBitmapFlip 
 80{
 81   GFXBitmapFlip_None = 0,
 82   GFXBitmapFlip_X    = 1 << 0,
 83   GFXBitmapFlip_Y    = 1 << 1,
 84   GFXBitmapFlip_XY   = GFXBitmapFlip_X | GFXBitmapFlip_Y
 85};
 86
 87enum GFXTextureAddressMode 
 88{
 89   GFXAddress_FIRST = 0,
 90   GFXAddressWrap = 0,
 91   GFXAddressMirror,
 92   GFXAddressClamp,
 93   GFXAddressBorder,
 94   GFXAddressMirrorOnce,
 95   GFXAddress_COUNT
 96};
 97
 98enum GFXTextureFilterType 
 99{
100   GFXTextureFilter_FIRST = 0,
101   GFXTextureFilterNone = 0,
102   GFXTextureFilterPoint,
103   GFXTextureFilterLinear,
104   GFXTextureFilterAnisotropic,
105   GFXTextureFilter_COUNT
106};
107
108enum GFXFillMode 
109{
110   GFXFill_FIRST = 1,
111   GFXFillPoint = 1,
112   GFXFillWireframe,
113   GFXFillSolid,
114   GFXFill_COUNT
115};
116
117enum GFXFormat 
118{
119   // when adding formats make sure to place
120   // them in the correct group!
121   //
122   // if displacing the first entry in the group
123   // make sure to update the GFXFormat_xBIT entries!
124   //
125   GFXFormat_FIRST = 0,
126
127   // 8 bit texture formats...
128   GFXFormatA8 = 0,// first in group...
129   GFXFormatL8,
130   GFXFormatA4L4,
131
132   // 16 bit texture formats...
133   GFXFormatR5G6B5,// first in group...
134   GFXFormatR5G5B5A1,
135   GFXFormatR5G5B5X1,
136   GFXFormatA8L8,
137   GFXFormatL16,
138   GFXFormatR16F,
139   GFXFormatD16,
140
141   // 24 bit texture formats...
142   GFXFormatR8G8B8,// first in group...
143   GFXFormatR8G8B8_SRGB,
144   // 32 bit texture formats...
145   GFXFormatR8G8B8A8,// first in group...
146   GFXFormatR8G8B8X8,
147   GFXFormatB8G8R8A8,
148   GFXFormatR8G8B8A8_SRGB,
149   GFXFormatR32F,
150   GFXFormatR16G16,
151   GFXFormatR16G16F,
152   GFXFormatR10G10B10A2,
153   GFXFormatR11G11B10,
154   GFXFormatD32,
155   GFXFormatD24X8,
156   GFXFormatD24S8,   
157   GFXFormatD24FS8,
158
159   // Guaranteed RGBA8 (for apis which really dont like bgr)
160   GFXFormatR8G8B8A8_LINEAR_FORCE,
161
162   // 64 bit texture formats...
163   GFXFormatR16G16B16A16,// first in group...
164   GFXFormatR16G16B16A16F,
165
166   // 128 bit texture formats...
167   GFXFormatR32G32B32A32F,// first in group...
168
169   // unknown size...Block compression
170   GFXFormatBC1,  //dxt1
171   GFXFormatBC2,  //dxt2/3
172   GFXFormatBC3,  //dxt4/5
173   GFXFormatBC4,  //3dc+ / ati1
174   GFXFormatBC5,  //3dc / ati2
175   // compressed sRGB formats   
176   GFXFormatBC1_SRGB,
177   GFXFormatBC2_SRGB,
178   GFXFormatBC3_SRGB,
179
180   GFXFormat_COUNT,
181
182   GFXFormat_8BIT = GFXFormatA8,
183   GFXFormat_16BIT = GFXFormatR5G6B5,
184   GFXFormat_24BIT = GFXFormatR8G8B8,
185   GFXFormat_32BIT = GFXFormatR8G8B8A8,
186   GFXFormat_64BIT = GFXFormatR16G16B16A16,
187   GFXFormat_128BIT = GFXFormatR32G32B32A32F,
188   GFXFormat_UNKNOWNSIZE = GFXFormatBC1
189};
190
191/// Returns the byte size of the pixel for non-compressed formats.
192inline U32 GFXFormat_getByteSize( GFXFormat format )
193{
194   AssertFatal( format < GFXFormat_UNKNOWNSIZE, 
195      "GFXDevice::formatByteSize - Cannot size a compressed format!" );
196
197   if ( format < GFXFormat_16BIT )
198      return 1;// 8 bit...
199   else if ( format < GFXFormat_24BIT )
200      return 2;// 16 bit...
201   else if ( format < GFXFormat_32BIT )
202      return 3;// 24 bit...
203   else if ( format < GFXFormat_64BIT )
204      return 4;// 32 bit...
205   else if ( format < GFXFormat_128BIT )
206      return 8;// 64 bit...
207
208   // This should be 128bits... else its a DDS and 
209   // the assert should have gone off above.
210   return 16;
211}
212
213enum GFXClearFlags 
214{
215   GFXClearTarget = 1 << 0,
216   GFXClearZBuffer = 1 << 1,
217   GFXClearStencil = 1 << 2,
218};
219
220/// The supported blend modes.
221enum GFXBlend 
222{
223   GFXBlend_FIRST = 0,
224   GFXBlendZero = 0, /// (0, 0, 0, 0)
225   GFXBlendOne, /// (1, 1, 1, 1)
226   GFXBlendSrcColor, /// (Rs, Gs, Bs, As)
227   GFXBlendInvSrcColor, /// (1 - Rs, 1 - Gs, 1 - Bs, 1 - As)
228   GFXBlendSrcAlpha, /// (As, As, As, As)
229   GFXBlendInvSrcAlpha, /// ( 1 - As, 1 - As, 1 - As, 1 - As)
230   GFXBlendDestAlpha, /// (Ad Ad Ad Ad)
231   GFXBlendInvDestAlpha, /// (1 - Ad 1 - Ad 1 - Ad 1 - Ad)
232   GFXBlendDestColor, /// (Rd, Gd, Bd, Ad)
233   GFXBlendInvDestColor, /// (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad)
234   GFXBlendSrcAlphaSat, /// (f, f, f, 1) where f = min(As, 1 - Ad)
235   GFXBlend_COUNT
236};
237
238/// Constants that name each GFXDevice type. Any new GFXDevice subclass must be
239/// added to this enum. A string representing its name must also be added to
240/// GFXInit::getAdapterNameFromType().
241enum GFXAdapterType 
242{
243   OpenGL = 0,
244   Direct3D11,
245   NullDevice,
246   GFXAdapterType_Count
247};
248
249enum GFXCullMode
250{
251   GFXCull_FIRST = 0,
252   GFXCullNone = 0,
253   GFXCullCW,
254   GFXCullCCW,
255   GFXCull_COUNT
256};
257
258enum GFXCmpFunc 
259{
260   GFXCmp_FIRST = 0,
261   GFXCmpNever = 0,
262   GFXCmpLess,
263   GFXCmpEqual,
264   GFXCmpLessEqual,
265   GFXCmpGreater,
266   GFXCmpNotEqual,
267   GFXCmpGreaterEqual,
268   GFXCmpAlways,
269   GFXCmp_COUNT
270};
271
272enum GFXStencilOp 
273{
274   GFXStencilOp_FIRST = 0,
275   GFXStencilOpKeep = 0,
276   GFXStencilOpZero,
277   GFXStencilOpReplace,
278   GFXStencilOpIncrSat,
279   GFXStencilOpDecrSat,
280   GFXStencilOpInvert,
281   GFXStencilOpIncr,
282   GFXStencilOpDecr,
283   GFXStencilOp_COUNT
284};
285
286enum GFXBlendOp 
287{ 
288   GFXBlendOp_FIRST = 0,
289   GFXBlendOpAdd = 0,
290   GFXBlendOpSubtract,
291   GFXBlendOpRevSubtract,
292   GFXBlendOpMin,
293   GFXBlendOpMax,
294   GFXBlendOp_COUNT
295};
296
297enum GFXMatrixType 
298{
299   GFXMatrixWorld = 256,
300   GFXMatrixView = 2,
301   GFXMatrixProjection = 3,
302   GFXMatrixTexture = 16,     // This value is texture matrix for sampler 0, can use this for offset
303   GFXMatrixTexture0 = 16,
304   GFXMatrixTexture1 = 17,
305   GFXMatrixTexture2 = 18,
306   GFXMatrixTexture3 = 19,
307   GFXMatrixTexture4 = 20,
308   GFXMatrixTexture5 = 21,
309   GFXMatrixTexture6 = 22,
310   GFXMatrixTexture7 = 23,
311};
312
313enum GFXShaderConstType
314{
315   /// GFX"S"hader"C"onstant"T"ype
316   // Scalar
317   GFXSCT_Float, 
318   // Vectors
319   GFXSCT_Float2, 
320   GFXSCT_Float3, 
321   GFXSCT_Float4, 
322   // Matrices
323   GFXSCT_Float2x2, 
324   GFXSCT_Float3x3,
325   GFXSCT_Float3x4,
326   GFXSCT_Float4x3,
327   GFXSCT_Float4x4, 
328   // Scalar
329   GFXSCT_Int, 
330   // Vectors
331   GFXSCT_Int2, 
332   GFXSCT_Int3, 
333   GFXSCT_Int4, 
334   // Samplers
335   GFXSCT_Sampler,
336   GFXSCT_SamplerCube,
337   GFXSCT_SamplerCubeArray,
338   GFXSCT_SamplerTextureArray
339};
340
341/// Defines a vertex declaration type.
342/// @see GFXVertexElement
343/// @see GFXVertexFormat
344enum GFXDeclType
345{
346   GFXDeclType_FIRST = 0,
347
348   /// A single component F32.
349   GFXDeclType_Float = 0,
350
351   /// A two-component F32.
352   /// @see Point2F
353   GFXDeclType_Float2,
354
355   /// A three-component F32. 
356   /// @see Point3F
357   GFXDeclType_Float3,
358
359   /// A four-component F32.
360   /// @see Point4F
361   GFXDeclType_Float4,
362
363   /// A four-component, packed, unsigned bytes mapped to 0 to 1 range.
364   /// @see GFXVertexColor
365   GFXDeclType_Color,
366
367   /// Four-component, packed, unsigned bytes ranged 0-255
368   GFXDeclType_UByte4,
369
370   /// The count of total GFXDeclTypes.
371   GFXDeclType_COUNT,
372};
373
374#endif // _GFXENUMS_H_
375