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