gfxEnums.h 15 KB

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