gfxEnums.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  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 rarely updated.
  38. ///< Updating might 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. GFXBufferTypeImmutable, ///< Immutable buffers must specify the data when creating the buffer. Cannot be modified.
  47. GFXBufferType_COUNT ///< Number of buffer types.
  48. };
  49. enum GFXTexCallbackCode
  50. {
  51. GFXZombify,
  52. GFXResurrect,
  53. };
  54. enum GFXPrimitiveType
  55. {
  56. GFXPT_FIRST = 0,
  57. GFXPointList = 0,
  58. GFXLineList,
  59. GFXLineStrip,
  60. GFXTriangleList,
  61. GFXTriangleStrip,
  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. // sRGB formats
  185. GFXFormatR8G8B8A8_SRGB,
  186. GFXFormat_COUNT,
  187. GFXFormat_8BIT = GFXFormatA8,
  188. GFXFormat_16BIT = GFXFormatR5G6B5,
  189. GFXFormat_24BIT = GFXFormatR8G8B8,
  190. GFXFormat_32BIT = GFXFormatR8G8B8A8,
  191. GFXFormat_64BIT = GFXFormatR16G16B16A16,
  192. GFXFormat_128BIT = GFXFormatR32G32B32A32F,
  193. GFXFormat_UNKNOWNSIZE = GFXFormatDXT1,
  194. };
  195. /// Returns the byte size of the pixel for non-compressed formats.
  196. inline U32 GFXFormat_getByteSize( GFXFormat format )
  197. {
  198. AssertFatal( format < GFXFormat_UNKNOWNSIZE,
  199. "GFXDevice::formatByteSize - Cannot size a compressed format!" );
  200. if ( format < GFXFormat_16BIT )
  201. return 1;// 8 bit...
  202. else if ( format < GFXFormat_24BIT )
  203. return 2;// 16 bit...
  204. else if ( format < GFXFormat_32BIT )
  205. return 3;// 24 bit...
  206. else if ( format < GFXFormat_64BIT )
  207. return 4;// 32 bit...
  208. else if ( format < GFXFormat_128BIT )
  209. return 8;// 64 bit...
  210. // This should be 128bits... else its a DDS and
  211. // the assert should have gone off above.
  212. return 16;
  213. }
  214. enum GFXShadeMode
  215. {
  216. GFXShadeFlat = 1,
  217. GFXShadeGouraud,
  218. GFXShadePhong,
  219. };
  220. enum GFXClearFlags
  221. {
  222. GFXClearTarget = 1 << 0,
  223. GFXClearZBuffer = 1 << 1,
  224. GFXClearStencil = 1 << 2,
  225. };
  226. /// The supported blend modes.
  227. enum GFXBlend
  228. {
  229. GFXBlend_FIRST = 0,
  230. GFXBlendZero = 0, /// (0, 0, 0, 0)
  231. GFXBlendOne, /// (1, 1, 1, 1)
  232. GFXBlendSrcColor, /// (Rs, Gs, Bs, As)
  233. GFXBlendInvSrcColor, /// (1 - Rs, 1 - Gs, 1 - Bs, 1 - As)
  234. GFXBlendSrcAlpha, /// (As, As, As, As)
  235. GFXBlendInvSrcAlpha, /// ( 1 - As, 1 - As, 1 - As, 1 - As)
  236. GFXBlendDestAlpha, /// (Ad Ad Ad Ad)
  237. GFXBlendInvDestAlpha, /// (1 - Ad 1 - Ad 1 - Ad 1 - Ad)
  238. GFXBlendDestColor, /// (Rd, Gd, Bd, Ad)
  239. GFXBlendInvDestColor, /// (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad)
  240. GFXBlendSrcAlphaSat, /// (f, f, f, 1) where f = min(As, 1 - Ad)
  241. GFXBlend_COUNT
  242. };
  243. /// Constants that name each GFXDevice type. Any new GFXDevice subclass must be
  244. /// added to this enum. A string representing its name must also be added to
  245. /// GFXInit::getAdapterNameFromType().
  246. enum GFXAdapterType
  247. {
  248. OpenGL = 0,
  249. Direct3D11,
  250. Direct3D9,
  251. NullDevice,
  252. Direct3D9_360,
  253. GFXAdapterType_Count
  254. };
  255. enum GFXCullMode
  256. {
  257. GFXCull_FIRST = 0,
  258. GFXCullNone = 0,
  259. GFXCullCW,
  260. GFXCullCCW,
  261. GFXCull_COUNT
  262. };
  263. enum GFXCmpFunc
  264. {
  265. GFXCmp_FIRST = 0,
  266. GFXCmpNever = 0,
  267. GFXCmpLess,
  268. GFXCmpEqual,
  269. GFXCmpLessEqual,
  270. GFXCmpGreater,
  271. GFXCmpNotEqual,
  272. GFXCmpGreaterEqual,
  273. GFXCmpAlways,
  274. GFXCmp_COUNT
  275. };
  276. enum GFXStencilOp
  277. {
  278. GFXStencilOp_FIRST = 0,
  279. GFXStencilOpKeep = 0,
  280. GFXStencilOpZero,
  281. GFXStencilOpReplace,
  282. GFXStencilOpIncrSat,
  283. GFXStencilOpDecrSat,
  284. GFXStencilOpInvert,
  285. GFXStencilOpIncr,
  286. GFXStencilOpDecr,
  287. GFXStencilOp_COUNT
  288. };
  289. enum GFXMaterialColorSource
  290. {
  291. GFXMCSMaterial = 0,
  292. GFXMCSColor1,
  293. GFXMCSColor2,
  294. };
  295. enum GFXBlendOp
  296. {
  297. GFXBlendOp_FIRST = 0,
  298. GFXBlendOpAdd = 0,
  299. GFXBlendOpSubtract,
  300. GFXBlendOpRevSubtract,
  301. GFXBlendOpMin,
  302. GFXBlendOpMax,
  303. GFXBlendOp_COUNT
  304. };
  305. enum GFXRenderState
  306. {
  307. GFXRenderState_FIRST = 0,
  308. GFXRSZEnable = 0,
  309. GFXRSFillMode,
  310. GFXRSShadeMode,
  311. GFXRSZWriteEnable,
  312. GFXRSAlphaTestEnable,
  313. GFXRSLastPixel,
  314. GFXRSSrcBlend,
  315. GFXRSDestBlend,
  316. GFXRSCullMode,
  317. GFXRSZFunc,
  318. GFXRSAlphaRef,
  319. GFXRSAlphaFunc,
  320. GFXRSDitherEnable,
  321. GFXRSAlphaBlendEnable,
  322. GFXRSFogEnable,
  323. GFXRSSpecularEnable,
  324. GFXRSFogColor,
  325. GFXRSFogTableMode,
  326. GFXRSFogStart,
  327. GFXRSFogEnd,
  328. GFXRSFogDensity,
  329. GFXRSRangeFogEnable,
  330. GFXRSStencilEnable,
  331. GFXRSStencilFail,
  332. GFXRSStencilZFail,
  333. GFXRSStencilPass,
  334. GFXRSStencilFunc,
  335. GFXRSStencilRef,
  336. GFXRSStencilMask,
  337. GFXRSStencilWriteMask,
  338. GFXRSTextureFactor,
  339. GFXRSWrap0,
  340. GFXRSWrap1,
  341. GFXRSWrap2,
  342. GFXRSWrap3,
  343. GFXRSWrap4,
  344. GFXRSWrap5,
  345. GFXRSWrap6,
  346. GFXRSWrap7,
  347. GFXRSClipping,
  348. GFXRSLighting,
  349. GFXRSAmbient,
  350. GFXRSFogVertexMode,
  351. GFXRSColorVertex,
  352. GFXRSLocalViewer,
  353. GFXRSNormalizeNormals,
  354. GFXRSDiffuseMaterialSource,
  355. GFXRSSpecularMaterialSource,
  356. GFXRSAmbientMaterialSource,
  357. GFXRSEmissiveMaterialSource,
  358. GFXRSVertexBlend,
  359. GFXRSClipPlaneEnable,
  360. GFXRSPointSize,
  361. GFXRSPointSizeMin,
  362. GFXRSPointSpriteEnable,
  363. GFXRSPointScaleEnable,
  364. GFXRSPointScale_A,
  365. GFXRSPointScale_B,
  366. GFXRSPointScale_C,
  367. GFXRSMultiSampleantiAlias,
  368. GFXRSMultiSampleMask,
  369. GFXRSPatchEdgeStyle,
  370. GFXRSDebugMonitorToken,
  371. GFXRSPointSize_Max,
  372. GFXRSIndexedVertexBlendEnable,
  373. GFXRSColorWriteEnable,
  374. GFXRSTweenFactor,
  375. GFXRSBlendOp,
  376. GFXRSPositionDegree,
  377. GFXRSNormalDegree,
  378. GFXRSScissorTestEnable,
  379. GFXRSSlopeScaleDepthBias,
  380. GFXRSAntiAliasedLineEnable,
  381. GFXRSMinTessellationLevel,
  382. GFXRSMaxTessellationLevel,
  383. GFXRSAdaptiveTess_X,
  384. GFXRSAdaptiveTess_Y,
  385. GFXRSdaptiveTess_Z,
  386. GFXRSAdaptiveTess_W,
  387. GFXRSEnableAdaptiveTesselation,
  388. GFXRSTwoSidedStencilMode,
  389. GFXRSCCWStencilFail,
  390. GFXRSCCWStencilZFail,
  391. GFXRSCCWStencilPass,
  392. GFXRSCCWStencilFunc,
  393. GFXRSColorWriteEnable1,
  394. GFXRSColorWriteEnable2,
  395. GFXRSolorWriteEnable3,
  396. GFXRSBlendFactor,
  397. GFXRSSRGBWriteEnable,
  398. GFXRSDepthBias,
  399. GFXRSWrap8,
  400. GFXRSWrap9,
  401. GFXRSWrap10,
  402. GFXRSWrap11,
  403. GFXRSWrap12,
  404. GFXRSWrap13,
  405. GFXRSWrap14,
  406. GFXRSWrap15,
  407. GFXRSSeparateAlphaBlendEnable,
  408. GFXRSSrcBlendAlpha,
  409. GFXRSDestBlendAlpha,
  410. GFXRSBlendOpAlpha,
  411. GFXRenderState_COUNT ///< Don't use this one, this is a counter
  412. };
  413. #define GFXCOLORWRITEENABLE_RED 1
  414. #define GFXCOLORWRITEENABLE_GREEN 2
  415. #define GFXCOLORWRITEENABLE_BLUE 4
  416. #define GFXCOLORWRITEENABLE_ALPHA 8
  417. enum GFXTextureStageState
  418. {
  419. GFXTSS_FIRST = 0,
  420. GFXTSSColorOp = 0,
  421. GFXTSSColorArg1,
  422. GFXTSSColorArg2,
  423. GFXTSSAlphaOp,
  424. GFXTSSAlphaArg1,
  425. GFXTSSAlphaArg2,
  426. GFXTSSBumpEnvMat00,
  427. GFXTSSBumpEnvMat01,
  428. GFXTSSBumpEnvMat10,
  429. GFXTSSBumpEnvMat11,
  430. GFXTSSTexCoordIndex,
  431. GFXTSSBumpEnvlScale,
  432. GFXTSSBumpEnvlOffset,
  433. GFXTSSTextureTransformFlags,
  434. GFXTSSColorArg0,
  435. GFXTSSAlphaArg0,
  436. GFXTSSResultArg,
  437. GFXTSSConstant,
  438. GFXTSS_COUNT ///< Don't use this one, this is a counter
  439. };
  440. enum GFXTextureTransformFlags
  441. {
  442. GFXTTFFDisable = 0,
  443. GFXTTFFCoord1D = 1,
  444. GFXTTFFCoord2D = 2,
  445. GFXTTFFCoord3D = 3,
  446. GFXTTFFCoord4D = 4,
  447. GFXTTFFProjected = 256,
  448. };
  449. // CodeReview: This number is used for the declaration of variables, but it
  450. // should *not* be used for any run-time purposes [7/2/2007 Pat]
  451. #define TEXTURE_STAGE_COUNT 16
  452. enum GFXSamplerState
  453. {
  454. GFXSAMP_FIRST = 0,
  455. GFXSAMPAddressU = 0,
  456. GFXSAMPAddressV,
  457. GFXSAMPAddressW,
  458. GFXSAMPBorderColor,
  459. GFXSAMPMagFilter,
  460. GFXSAMPMinFilter,
  461. GFXSAMPMipFilter,
  462. GFXSAMPMipMapLODBias,
  463. GFXSAMPMaxMipLevel,
  464. GFXSAMPMaxAnisotropy,
  465. GFXSAMPSRGBTexture,
  466. GFXSAMPElementIndex,
  467. GFXSAMPDMapOffset,
  468. GFXSAMP_COUNT ///< Don't use this one, this is a counter
  469. };
  470. enum GFXTextureArgument
  471. {
  472. GFXTA_FIRST = 0,
  473. GFXTADiffuse = 0,
  474. GFXTACurrent,
  475. GFXTATexture,
  476. GFXTATFactor,
  477. GFXTASpecular,
  478. GFXTATemp,
  479. GFXTAConstant,
  480. GFXTA_COUNT,
  481. GFXTAComplement = 0x00000010, // take 1.0 - x (read modifier)
  482. GFXTAAlphaReplicate = 0x00000020, // replicate alpha to color components (read modifier)
  483. };
  484. // Matrix stuff
  485. #define WORLD_STACK_MAX 24
  486. enum GFXMatrixType
  487. {
  488. GFXMatrixWorld = 256,
  489. GFXMatrixView = 2,
  490. GFXMatrixProjection = 3,
  491. GFXMatrixTexture = 16, // This value is texture matrix for sampler 0, can use this for offset
  492. GFXMatrixTexture0 = 16,
  493. GFXMatrixTexture1 = 17,
  494. GFXMatrixTexture2 = 18,
  495. GFXMatrixTexture3 = 19,
  496. GFXMatrixTexture4 = 20,
  497. GFXMatrixTexture5 = 21,
  498. GFXMatrixTexture6 = 22,
  499. GFXMatrixTexture7 = 23,
  500. };
  501. // Light define
  502. #define LIGHT_STAGE_COUNT 8
  503. #define GFXVERTEXFLAG_F32 3
  504. #define GFXVERTEXFLAG_POINT2F 0
  505. #define GFXVERTEXFLAG_POINT3F 1
  506. #define GFXVERTEXFLAG_POINT4F 2
  507. #define GFXVERTEXFLAG_TEXCOORD_F32(CoordIndex) ( GFXVERTEXFLAG_F32 << ( CoordIndex * 2 + 16 ) )
  508. #define GFXVERTEXFLAG_TEXCOORD_POINT2F(CoordIndex) ( GFXVERTEXFLAG_POINT2F )
  509. #define GFXVERTEXFLAG_TEXCOORD_POINT3F(CoordIndex) ( GFXVERTEXFLAG_POINT3F << ( CoordIndex * 2 + 16 ) )
  510. #define GFXVERTEXFLAG_TEXCOORD_POINT4F(CoordIndex) ( GFXVERTEXFLAG_POINT4F << ( CoordIndex * 2 + 16 ) )
  511. #define STATE_STACK_SIZE 32
  512. // Index Formats
  513. enum GFXIndexFormat
  514. {
  515. GFXIndexFormat_FIRST = 0,
  516. GFXIndexFormat16 = 0,
  517. GFXIndexFormat32,
  518. GFXIndexFormat_COUNT
  519. };
  520. enum GFXShaderConstType
  521. {
  522. /// GFX"S"hader"C"onstant"T"ype
  523. // Scalar
  524. GFXSCT_Float,
  525. // Vectors
  526. GFXSCT_Float2,
  527. GFXSCT_Float3,
  528. GFXSCT_Float4,
  529. // Matrices
  530. GFXSCT_Float2x2,
  531. GFXSCT_Float3x3,
  532. GFXSCT_Float4x4,
  533. // Scalar
  534. GFXSCT_Int,
  535. // Vectors
  536. GFXSCT_Int2,
  537. GFXSCT_Int3,
  538. GFXSCT_Int4,
  539. // Samplers
  540. GFXSCT_Sampler,
  541. GFXSCT_SamplerCube
  542. };
  543. /// Defines a vertex declaration type.
  544. /// @see GFXVertexElement
  545. /// @see GFXVertexFormat
  546. enum GFXDeclType
  547. {
  548. GFXDeclType_FIRST = 0,
  549. /// A single component F32.
  550. GFXDeclType_Float = 0,
  551. /// A two-component F32.
  552. /// @see Point2F
  553. GFXDeclType_Float2,
  554. /// A three-component F32.
  555. /// @see Point3F
  556. GFXDeclType_Float3,
  557. /// A four-component F32.
  558. /// @see Point4F
  559. GFXDeclType_Float4,
  560. /// A four-component, packed, unsigned bytes mapped to 0 to 1 range.
  561. /// @see GFXVertexColor
  562. GFXDeclType_Color,
  563. /// The count of total GFXDeclTypes.
  564. GFXDeclType_COUNT,
  565. };
  566. #endif // _GFXENUMS_H_