gfxEnums.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. #ifndef _GFXENUMS_H_
  23. #define _GFXENUMS_H_
  24. #include "core/util/fourcc.h"
  25. // These are for the enum translation. It will help with porting to other platforms
  26. // and API's.
  27. #define GFX_UNSUPPORTED_VAL 0xDEADBEEF
  28. #define GFX_UNINIT_VAL 0xDECAFBAD
  29. // Adjust these pools to your app's needs. Be aware dynamic vertices are much more
  30. // expensive than static vertices. These are in gfxEnums because they should be
  31. // consistant across all APIs/platforms so that the dynamic buffer performance
  32. // and behavior is also consistant. -patw
  33. #define MAX_DYNAMIC_VERTS (8192*2)
  34. #define MAX_DYNAMIC_INDICES (8192*4)
  35. enum GFXBufferType
  36. {
  37. GFXBufferTypeStatic, ///< Static vertex buffers are created and filled one time.
  38. ///< incur a performance penalty. Resizing a static vertex buffer is not
  39. ///< allowed.
  40. GFXBufferTypeDynamic, ///< Dynamic vertex buffers are meant for vertices that can be changed
  41. ///< often. Vertices written into dynamic vertex buffers will remain valid
  42. ///< until the dynamic vertex buffer is released. Resizing a dynamic vertex buffer is not
  43. ///< allowed.
  44. GFXBufferTypeVolatile, ///< Volatile vertex or index buffers are meant for vertices or indices that are essentially
  45. ///< only used once. They can be resized without any performance penalty.
  46. GFXBufferType_COUNT ///< Number of buffer types.
  47. };
  48. enum GFXTexCallbackCode
  49. {
  50. GFXZombify,
  51. GFXResurrect,
  52. };
  53. enum GFXPrimitiveType
  54. {
  55. GFXPT_FIRST = 0,
  56. GFXPointList = 0,
  57. GFXLineList,
  58. GFXLineStrip,
  59. GFXTriangleList,
  60. GFXTriangleStrip,
  61. GFXTriangleFan,
  62. GFXPT_COUNT
  63. };
  64. enum GFXTextureType
  65. {
  66. GFXTextureType_Normal,
  67. GFXTextureType_KeepBitmap,
  68. GFXTextureType_Dynamic,
  69. GFXTextureType_RenderTarget,
  70. GFXTextureType_Count
  71. };
  72. enum GFXBitmapFlip
  73. {
  74. GFXBitmapFlip_None = 0,
  75. GFXBitmapFlip_X = 1 << 0,
  76. GFXBitmapFlip_Y = 1 << 1,
  77. GFXBitmapFlip_XY = GFXBitmapFlip_X | GFXBitmapFlip_Y
  78. };
  79. enum GFXTextureOp
  80. {
  81. GFXTOP_FIRST = 0,
  82. GFXTOPDisable = 0,
  83. GFXTOPSelectARG1,
  84. GFXTOPSelectARG2,
  85. GFXTOPModulate,
  86. GFXTOPModulate2X,
  87. GFXTOPModulate4X,
  88. GFXTOPAdd,
  89. GFXTOPAddSigned,
  90. GFXTOPAddSigned2X,
  91. GFXTOPSubtract,
  92. GFXTOPAddSmooth,
  93. GFXTOPBlendDiffuseAlpha,
  94. GFXTOPBlendTextureAlpha,
  95. GFXTOPBlendFactorAlpha,
  96. GFXTOPBlendTextureAlphaPM,
  97. GFXTOPBlendCURRENTALPHA,
  98. GFXTOPPreModulate,
  99. GFXTOPModulateAlphaAddColor,
  100. GFXTOPModulateColorAddAlpha,
  101. GFXTOPModulateInvAlphaAddColor,
  102. GFXTOPModulateInvColorAddAlpha,
  103. GFXTOPBumpEnvMap,
  104. GFXTOPBumpEnvMapLuminance,
  105. GFXTOPDotProduct3,
  106. GFXTOPLERP,
  107. GFXTOP_COUNT
  108. };
  109. enum GFXTextureAddressMode
  110. {
  111. GFXAddress_FIRST = 0,
  112. GFXAddressWrap = 0,
  113. GFXAddressMirror,
  114. GFXAddressClamp,
  115. GFXAddressBorder,
  116. GFXAddressMirrorOnce,
  117. GFXAddress_COUNT
  118. };
  119. enum GFXTextureFilterType
  120. {
  121. GFXTextureFilter_FIRST = 0,
  122. GFXTextureFilterNone = 0,
  123. GFXTextureFilterPoint,
  124. GFXTextureFilterLinear,
  125. GFXTextureFilterAnisotropic,
  126. GFXTextureFilterPyramidalQuad,
  127. GFXTextureFilterGaussianQuad,
  128. GFXTextureFilter_COUNT
  129. };
  130. enum GFXFillMode
  131. {
  132. GFXFill_FIRST = 1,
  133. GFXFillPoint = 1,
  134. GFXFillWireframe,
  135. GFXFillSolid,
  136. GFXFill_COUNT
  137. };
  138. enum GFXFormat
  139. {
  140. // when adding formats make sure to place
  141. // them in the correct group!
  142. //
  143. // if displacing the first entry in the group
  144. // make sure to update the GFXFormat_xBIT entries!
  145. //
  146. GFXFormat_FIRST = 0,
  147. // 8 bit texture formats...
  148. GFXFormatA8 = 0,// first in group...
  149. GFXFormatL8,
  150. GFXFormatA4L4,
  151. // 16 bit texture formats...
  152. GFXFormatR5G6B5,// first in group...
  153. GFXFormatR5G5B5A1,
  154. GFXFormatR5G5B5X1,
  155. GFXFormatA8L8,
  156. GFXFormatL16,
  157. GFXFormatR16F,
  158. GFXFormatD16,
  159. // 24 bit texture formats...
  160. GFXFormatR8G8B8,// first in group...
  161. // 32 bit texture formats...
  162. GFXFormatR8G8B8A8,// first in group...
  163. GFXFormatR8G8B8X8,
  164. GFXFormatB8G8R8A8,
  165. GFXFormatR32F,
  166. GFXFormatR16G16,
  167. GFXFormatR16G16F,
  168. GFXFormatR10G10B10A2,
  169. GFXFormatD32,
  170. GFXFormatD24X8,
  171. GFXFormatD24S8,
  172. GFXFormatD24FS8,
  173. // 64 bit texture formats...
  174. GFXFormatR16G16B16A16,// first in group...
  175. GFXFormatR16G16B16A16F,
  176. // 128 bit texture formats...
  177. GFXFormatR32G32B32A32F,// first in group...
  178. // unknown size...
  179. GFXFormatDXT1,// first in group...
  180. GFXFormatDXT2,
  181. GFXFormatDXT3,
  182. GFXFormatDXT4,
  183. GFXFormatDXT5,
  184. GFXFormat_COUNT,
  185. GFXFormat_8BIT = GFXFormatA8,
  186. GFXFormat_16BIT = GFXFormatR5G6B5,
  187. GFXFormat_24BIT = GFXFormatR8G8B8,
  188. GFXFormat_32BIT = GFXFormatR8G8B8A8,
  189. GFXFormat_64BIT = GFXFormatR16G16B16A16,
  190. GFXFormat_128BIT = GFXFormatR32G32B32A32F,
  191. GFXFormat_UNKNOWNSIZE = GFXFormatDXT1,
  192. };
  193. /// Returns the byte size of the pixel for non-compressed formats.
  194. inline U32 GFXFormat_getByteSize( GFXFormat format )
  195. {
  196. AssertFatal( format < GFXFormat_UNKNOWNSIZE,
  197. "GFXDevice::formatByteSize - Cannot size a compressed format!" );
  198. if ( format < GFXFormat_16BIT )
  199. return 1;// 8 bit...
  200. else if ( format < GFXFormat_24BIT )
  201. return 2;// 16 bit...
  202. else if ( format < GFXFormat_32BIT )
  203. return 3;// 24 bit...
  204. else if ( format < GFXFormat_64BIT )
  205. return 4;// 32 bit...
  206. else if ( format < GFXFormat_128BIT )
  207. return 8;// 64 bit...
  208. // This should be 128bits... else its a DDS and
  209. // the assert should have gone off above.
  210. return 16;
  211. }
  212. enum GFXShadeMode
  213. {
  214. GFXShadeFlat = 1,
  215. GFXShadeGouraud,
  216. GFXShadePhong,
  217. };
  218. enum GFXClearFlags
  219. {
  220. GFXClearTarget = 1 << 0,
  221. GFXClearZBuffer = 1 << 1,
  222. GFXClearStencil = 1 << 2,
  223. };
  224. /// The supported blend modes.
  225. enum GFXBlend
  226. {
  227. GFXBlend_FIRST = 0,
  228. GFXBlendZero = 0, /// (0, 0, 0, 0)
  229. GFXBlendOne, /// (1, 1, 1, 1)
  230. GFXBlendSrcColor, /// (Rs, Gs, Bs, As)
  231. GFXBlendInvSrcColor, /// (1 - Rs, 1 - Gs, 1 - Bs, 1 - As)
  232. GFXBlendSrcAlpha, /// (As, As, As, As)
  233. GFXBlendInvSrcAlpha, /// ( 1 - As, 1 - As, 1 - As, 1 - As)
  234. GFXBlendDestAlpha, /// (Ad Ad Ad Ad)
  235. GFXBlendInvDestAlpha, /// (1 - Ad 1 - Ad 1 - Ad 1 - Ad)
  236. GFXBlendDestColor, /// (Rd, Gd, Bd, Ad)
  237. GFXBlendInvDestColor, /// (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad)
  238. GFXBlendSrcAlphaSat, /// (f, f, f, 1) where f = min(As, 1 - Ad)
  239. GFXBlend_COUNT
  240. };
  241. /// Constants that name each GFXDevice type. Any new GFXDevice subclass must be
  242. /// added to this enum. A string representing its name must also be added to
  243. /// GFXInit::getAdapterNameFromType().
  244. enum GFXAdapterType
  245. {
  246. OpenGL = 0,
  247. Direct3D9,
  248. Direct3D8,
  249. NullDevice,
  250. Direct3D9_360,
  251. GFXAdapterType_Count
  252. };
  253. enum GFXCullMode
  254. {
  255. GFXCull_FIRST = 0,
  256. GFXCullNone = 0,
  257. GFXCullCW,
  258. GFXCullCCW,
  259. GFXCull_COUNT
  260. };
  261. enum GFXCmpFunc
  262. {
  263. GFXCmp_FIRST = 0,
  264. GFXCmpNever = 0,
  265. GFXCmpLess,
  266. GFXCmpEqual,
  267. GFXCmpLessEqual,
  268. GFXCmpGreater,
  269. GFXCmpNotEqual,
  270. GFXCmpGreaterEqual,
  271. GFXCmpAlways,
  272. GFXCmp_COUNT
  273. };
  274. enum GFXStencilOp
  275. {
  276. GFXStencilOp_FIRST = 0,
  277. GFXStencilOpKeep = 0,
  278. GFXStencilOpZero,
  279. GFXStencilOpReplace,
  280. GFXStencilOpIncrSat,
  281. GFXStencilOpDecrSat,
  282. GFXStencilOpInvert,
  283. GFXStencilOpIncr,
  284. GFXStencilOpDecr,
  285. GFXStencilOp_COUNT
  286. };
  287. enum GFXMaterialColorSource
  288. {
  289. GFXMCSMaterial = 0,
  290. GFXMCSColor1,
  291. GFXMCSColor2,
  292. };
  293. enum GFXBlendOp
  294. {
  295. GFXBlendOp_FIRST = 0,
  296. GFXBlendOpAdd = 0,
  297. GFXBlendOpSubtract,
  298. GFXBlendOpRevSubtract,
  299. GFXBlendOpMin,
  300. GFXBlendOpMax,
  301. GFXBlendOp_COUNT
  302. };
  303. enum GFXRenderState
  304. {
  305. GFXRenderState_FIRST = 0,
  306. GFXRSZEnable = 0,
  307. GFXRSFillMode,
  308. GFXRSShadeMode,
  309. GFXRSZWriteEnable,
  310. GFXRSAlphaTestEnable,
  311. GFXRSLastPixel,
  312. GFXRSSrcBlend,
  313. GFXRSDestBlend,
  314. GFXRSCullMode,
  315. GFXRSZFunc,
  316. GFXRSAlphaRef,
  317. GFXRSAlphaFunc,
  318. GFXRSDitherEnable,
  319. GFXRSAlphaBlendEnable,
  320. GFXRSFogEnable,
  321. GFXRSSpecularEnable,
  322. GFXRSFogColor,
  323. GFXRSFogTableMode,
  324. GFXRSFogStart,
  325. GFXRSFogEnd,
  326. GFXRSFogDensity,
  327. GFXRSRangeFogEnable,
  328. GFXRSStencilEnable,
  329. GFXRSStencilFail,
  330. GFXRSStencilZFail,
  331. GFXRSStencilPass,
  332. GFXRSStencilFunc,
  333. GFXRSStencilRef,
  334. GFXRSStencilMask,
  335. GFXRSStencilWriteMask,
  336. GFXRSTextureFactor,
  337. GFXRSWrap0,
  338. GFXRSWrap1,
  339. GFXRSWrap2,
  340. GFXRSWrap3,
  341. GFXRSWrap4,
  342. GFXRSWrap5,
  343. GFXRSWrap6,
  344. GFXRSWrap7,
  345. GFXRSClipping,
  346. GFXRSLighting,
  347. GFXRSAmbient,
  348. GFXRSFogVertexMode,
  349. GFXRSColorVertex,
  350. GFXRSLocalViewer,
  351. GFXRSNormalizeNormals,
  352. GFXRSDiffuseMaterialSource,
  353. GFXRSSpecularMaterialSource,
  354. GFXRSAmbientMaterialSource,
  355. GFXRSEmissiveMaterialSource,
  356. GFXRSVertexBlend,
  357. GFXRSClipPlaneEnable,
  358. GFXRSPointSize,
  359. GFXRSPointSizeMin,
  360. GFXRSPointSpriteEnable,
  361. GFXRSPointScaleEnable,
  362. GFXRSPointScale_A,
  363. GFXRSPointScale_B,
  364. GFXRSPointScale_C,
  365. GFXRSMultiSampleantiAlias,
  366. GFXRSMultiSampleMask,
  367. GFXRSPatchEdgeStyle,
  368. GFXRSDebugMonitorToken,
  369. GFXRSPointSize_Max,
  370. GFXRSIndexedVertexBlendEnable,
  371. GFXRSColorWriteEnable,
  372. GFXRSTweenFactor,
  373. GFXRSBlendOp,
  374. GFXRSPositionDegree,
  375. GFXRSNormalDegree,
  376. GFXRSScissorTestEnable,
  377. GFXRSSlopeScaleDepthBias,
  378. GFXRSAntiAliasedLineEnable,
  379. GFXRSMinTessellationLevel,
  380. GFXRSMaxTessellationLevel,
  381. GFXRSAdaptiveTess_X,
  382. GFXRSAdaptiveTess_Y,
  383. GFXRSdaptiveTess_Z,
  384. GFXRSAdaptiveTess_W,
  385. GFXRSEnableAdaptiveTesselation,
  386. GFXRSTwoSidedStencilMode,
  387. GFXRSCCWStencilFail,
  388. GFXRSCCWStencilZFail,
  389. GFXRSCCWStencilPass,
  390. GFXRSCCWStencilFunc,
  391. GFXRSColorWriteEnable1,
  392. GFXRSColorWriteEnable2,
  393. GFXRSolorWriteEnable3,
  394. GFXRSBlendFactor,
  395. GFXRSSRGBWriteEnable,
  396. GFXRSDepthBias,
  397. GFXRSWrap8,
  398. GFXRSWrap9,
  399. GFXRSWrap10,
  400. GFXRSWrap11,
  401. GFXRSWrap12,
  402. GFXRSWrap13,
  403. GFXRSWrap14,
  404. GFXRSWrap15,
  405. GFXRSSeparateAlphaBlendEnable,
  406. GFXRSSrcBlendAlpha,
  407. GFXRSDestBlendAlpha,
  408. GFXRSBlendOpAlpha,
  409. GFXRenderState_COUNT ///< Don't use this one, this is a counter
  410. };
  411. #define GFXCOLORWRITEENABLE_RED 1
  412. #define GFXCOLORWRITEENABLE_GREEN 2
  413. #define GFXCOLORWRITEENABLE_BLUE 4
  414. #define GFXCOLORWRITEENABLE_ALPHA 8
  415. enum GFXTextureStageState
  416. {
  417. GFXTSS_FIRST = 0,
  418. GFXTSSColorOp = 0,
  419. GFXTSSColorArg1,
  420. GFXTSSColorArg2,
  421. GFXTSSAlphaOp,
  422. GFXTSSAlphaArg1,
  423. GFXTSSAlphaArg2,
  424. GFXTSSBumpEnvMat00,
  425. GFXTSSBumpEnvMat01,
  426. GFXTSSBumpEnvMat10,
  427. GFXTSSBumpEnvMat11,
  428. GFXTSSTexCoordIndex,
  429. GFXTSSBumpEnvlScale,
  430. GFXTSSBumpEnvlOffset,
  431. GFXTSSTextureTransformFlags,
  432. GFXTSSColorArg0,
  433. GFXTSSAlphaArg0,
  434. GFXTSSResultArg,
  435. GFXTSSConstant,
  436. GFXTSS_COUNT ///< Don't use this one, this is a counter
  437. };
  438. enum GFXTextureTransformFlags
  439. {
  440. GFXTTFFDisable = 0,
  441. GFXTTFFCoord1D = 1,
  442. GFXTTFFCoord2D = 2,
  443. GFXTTFFCoord3D = 3,
  444. GFXTTFFCoord4D = 4,
  445. GFXTTFFProjected = 256,
  446. };
  447. // CodeReview: This number is used for the declaration of variables, but it
  448. // should *not* be used for any run-time purposes [7/2/2007 Pat]
  449. #define TEXTURE_STAGE_COUNT 16
  450. enum GFXSamplerState
  451. {
  452. GFXSAMP_FIRST = 0,
  453. GFXSAMPAddressU = 0,
  454. GFXSAMPAddressV,
  455. GFXSAMPAddressW,
  456. GFXSAMPBorderColor,
  457. GFXSAMPMagFilter,
  458. GFXSAMPMinFilter,
  459. GFXSAMPMipFilter,
  460. GFXSAMPMipMapLODBias,
  461. GFXSAMPMaxMipLevel,
  462. GFXSAMPMaxAnisotropy,
  463. GFXSAMPSRGBTexture,
  464. GFXSAMPElementIndex,
  465. GFXSAMPDMapOffset,
  466. GFXSAMP_COUNT ///< Don't use this one, this is a counter
  467. };
  468. enum GFXTextureArgument
  469. {
  470. GFXTA_FIRST = 0,
  471. GFXTADiffuse = 0,
  472. GFXTACurrent,
  473. GFXTATexture,
  474. GFXTATFactor,
  475. GFXTASpecular,
  476. GFXTATemp,
  477. GFXTAConstant,
  478. GFXTA_COUNT,
  479. GFXTAComplement = 0x00000010, // take 1.0 - x (read modifier)
  480. GFXTAAlphaReplicate = 0x00000020, // replicate alpha to color components (read modifier)
  481. };
  482. // Matrix stuff
  483. #define WORLD_STACK_MAX 24
  484. enum GFXMatrixType
  485. {
  486. GFXMatrixWorld = 256,
  487. GFXMatrixView = 2,
  488. GFXMatrixProjection = 3,
  489. GFXMatrixTexture = 16, // This value is texture matrix for sampler 0, can use this for offset
  490. GFXMatrixTexture0 = 16,
  491. GFXMatrixTexture1 = 17,
  492. GFXMatrixTexture2 = 18,
  493. GFXMatrixTexture3 = 19,
  494. GFXMatrixTexture4 = 20,
  495. GFXMatrixTexture5 = 21,
  496. GFXMatrixTexture6 = 22,
  497. GFXMatrixTexture7 = 23,
  498. };
  499. // Light define
  500. #define LIGHT_STAGE_COUNT 8
  501. #define GFXVERTEXFLAG_F32 3
  502. #define GFXVERTEXFLAG_POINT2F 0
  503. #define GFXVERTEXFLAG_POINT3F 1
  504. #define GFXVERTEXFLAG_POINT4F 2
  505. #define GFXVERTEXFLAG_TEXCOORD_F32(CoordIndex) ( GFXVERTEXFLAG_F32 << ( CoordIndex * 2 + 16 ) )
  506. #define GFXVERTEXFLAG_TEXCOORD_POINT2F(CoordIndex) ( GFXVERTEXFLAG_POINT2F )
  507. #define GFXVERTEXFLAG_TEXCOORD_POINT3F(CoordIndex) ( GFXVERTEXFLAG_POINT3F << ( CoordIndex * 2 + 16 ) )
  508. #define GFXVERTEXFLAG_TEXCOORD_POINT4F(CoordIndex) ( GFXVERTEXFLAG_POINT4F << ( CoordIndex * 2 + 16 ) )
  509. #define STATE_STACK_SIZE 32
  510. // Index Formats
  511. enum GFXIndexFormat
  512. {
  513. GFXIndexFormat_FIRST = 0,
  514. GFXIndexFormat16 = 0,
  515. GFXIndexFormat32,
  516. GFXIndexFormat_COUNT
  517. };
  518. enum GFXShaderConstType
  519. {
  520. /// GFX"S"hader"C"onstant"T"ype
  521. // Scalar
  522. GFXSCT_Float,
  523. // Vectors
  524. GFXSCT_Float2,
  525. GFXSCT_Float3,
  526. GFXSCT_Float4,
  527. // Matrices
  528. GFXSCT_Float2x2,
  529. GFXSCT_Float3x3,
  530. GFXSCT_Float4x4,
  531. // Scalar
  532. GFXSCT_Int,
  533. // Vectors
  534. GFXSCT_Int2,
  535. GFXSCT_Int3,
  536. GFXSCT_Int4,
  537. // Samplers
  538. GFXSCT_Sampler,
  539. GFXSCT_SamplerCube
  540. };
  541. /// Defines a vertex declaration type.
  542. /// @see GFXVertexElement
  543. /// @see GFXVertexFormat
  544. enum GFXDeclType
  545. {
  546. GFXDeclType_FIRST = 0,
  547. /// A single component F32.
  548. GFXDeclType_Float = 0,
  549. /// A two-component F32.
  550. /// @see Point2F
  551. GFXDeclType_Float2,
  552. /// A three-component F32.
  553. /// @see Point3F
  554. GFXDeclType_Float3,
  555. /// A four-component F32.
  556. /// @see Point4F
  557. GFXDeclType_Float4,
  558. /// A four-component, packed, unsigned bytes mapped to 0 to 1 range.
  559. /// @see GFXVertexColor
  560. GFXDeclType_Color,
  561. /// The count of total GFXDeclTypes.
  562. GFXDeclType_COUNT,
  563. };
  564. #endif // _GFXENUMS_H_