Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.3 KiB

  1. #ifndef TEXTURE_G_H
  2. #define TEXTURE_G_H
  3. #ifdef COMPILER_MSVC
  4. #pragma once
  5. #endif
  6. #include "resourcefile/resourcefile.h"
  7. #include "resourcefile/resourcetype.h"
  8. #include "mathlib/vector4d.h"
  9. //-----------------------------------------------------------------------------
  10. // Forward declarations
  11. //-----------------------------------------------------------------------------
  12. struct TextureDesc_t;
  13. struct TextureHeader_t;
  14. struct TextureBits_t;
  15. //-----------------------------------------------------------------------------
  16. // Enum definitions
  17. //-----------------------------------------------------------------------------
  18. schema enum TextureSpecificationFlags_t
  19. {
  20. TSPEC_FLAGS = 0x0000,// (explicit)
  21. TSPEC_RENDER_TARGET = 0x0001,// (explicit)
  22. TSPEC_VERTEX_TEXTURE = 0x0002,// (explicit)
  23. TSPEC_UNFILTERABLE_OK = 0x0004,// (explicit)
  24. TSPEC_RENDER_TARGET_SAMPLEABLE = 0x0008,// (explicit)
  25. TSPEC_SUGGEST_CLAMPS = 0x0010,
  26. TSPEC_SUGGEST_CLAMPT = 0x0020,
  27. TSPEC_SUGGEST_CLAMPU = 0x0040,
  28. TSPEC_NO_LOD = 0x0080, // Don't downsample on lower-level cards
  29. };
  30. schema enum RenderMultisampleType_t
  31. {
  32. RENDER_MULTISAMPLE_INVALID = -1,// (explicit)
  33. RENDER_MULTISAMPLE_NONE = 0,// (explicit)
  34. RENDER_MULTISAMPLE_2X = 1,
  35. RENDER_MULTISAMPLE_4X = 2,
  36. RENDER_MULTISAMPLE_6X = 3,
  37. RENDER_MULTISAMPLE_8X = 4,
  38. RENDER_MULTISAMPLE_16X = 5,
  39. };
  40. //-----------------------------------------------------------------------------
  41. // Structure definitions
  42. //-----------------------------------------------------------------------------
  43. schema struct TextureDesc_t
  44. {
  45. uint16 m_nWidth;
  46. uint16 m_nHeight;
  47. uint16 m_nDepth;
  48. int8 m_nImageFormat;
  49. uint8 m_nNumMipLevels;
  50. };
  51. schema struct TextureHeader_t : public TextureDesc_t
  52. {
  53. uint16 m_nMultisampleType; // See RenderMultisampleType_t
  54. uint16 m_nFlags; // See TextureSpecificationFlags_t
  55. Vector4D m_Reflectivity;
  56. };
  57. //! uncacheableStruct = TextureHeader_t
  58. schema struct TextureBits_t
  59. {
  60. };
  61. class CTextureBits; // Forward declaration of associated runtime class
  62. DEFINE_RESOURCE_CLASS_TYPE( TextureBits_t, CTextureBits, RESOURCE_TYPE_TEXTURE );
  63. typedef const ResourceBinding_t< CTextureBits > *HRenderTexture;
  64. typedef CStrongHandle< CTextureBits > HRenderTextureStrong;
  65. #define RENDER_TEXTURE_HANDLE_INVALID ( (HRenderTexture)0 )
  66. #endif // TEXTURE_G_H