gfxEnums.h 15 KB

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