2
0

gfxEnums.h 15 KB

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