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.

48 lines
1.4 KiB

  1. //========= Copyright � 1996-2013, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Provide interface to the custom texture generator
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef I_COMPOSITE_TEXTURE_GENERATOR_H
  8. #define I_COMPOSITE_TEXTURE_GENERATOR_H
  9. #include "materialsystem/icompositetexture.h"
  10. class IVisualsDataProcessor;
  11. enum CompositeTextureFormat_t
  12. {
  13. COMPOSITE_TEXTURE_FORMAT_DXT1 = 1,
  14. COMPOSITE_TEXTURE_FORMAT_DXT5 = 5
  15. };
  16. enum CompositeTextureSize_t
  17. {
  18. COMPOSITE_TEXTURE_SIZE_256 = 8,
  19. COMPOSITE_TEXTURE_SIZE_512,
  20. COMPOSITE_TEXTURE_SIZE_1024,
  21. COMPOSITE_TEXTURE_SIZE_2048
  22. };
  23. struct SCompositeTextureInfo
  24. {
  25. IVisualsDataProcessor *m_pVisualsDataProcessor;
  26. CompositeTextureSize_t m_size;
  27. CompositeTextureFormat_t m_format;
  28. int m_nMaterialParamID;
  29. bool m_bSRGB;
  30. };
  31. class ICompositeTextureGenerator
  32. {
  33. public:
  34. virtual bool Process( void ) = 0;
  35. virtual ICompositeTexture *GetCompositeTexture( IVisualsDataProcessor *pVisualsDataProcessor, int nMaterialParamNameId, CompositeTextureSize_t size, CompositeTextureFormat_t format, bool bSRGB, bool bIgnorePicMip = false , bool bAllowCreate = true ) = 0;
  36. virtual ICompositeTexture *GetCompositeTexture( const SCompositeTextureInfo &textureInfo, bool bIgnorePicMip = false , bool bAllowCreate = true ) = 0;
  37. virtual bool ForceRegenerate( ICompositeTexture *pTexture ) = 0;
  38. };
  39. #endif // I_COMPOSITE_TEXTURE_GENERATOR_H