Team Fortress 2 Source Code as on 22/4/2020
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.

41 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //=============================================================================//
  9. #ifndef UTILMATLIB_H
  10. #define UTILMATLIB_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #define MATERIAL_NOT_FOUND NULL
  15. class IMaterialSystem;
  16. extern IMaterialSystem *g_pMaterialSystem;
  17. typedef void *MaterialSystemMaterial_t;
  18. #define UTILMATLIB_NEEDS_BUMPED_LIGHTMAPS 0
  19. #define UTILMATLIB_NEEDS_LIGHTMAP 1
  20. #define UTILMATLIB_OPACITY 2
  21. enum { UTILMATLIB_ALPHATEST = 0, UTILMATLIB_OPAQUE, UTILMATLIB_TRANSLUCENT };
  22. void InitMaterialSystem( const char *materialBaseDirPath, CreateInterfaceFn fileSystemFactory );
  23. void ShutdownMaterialSystem( );
  24. MaterialSystemMaterial_t FindMaterial( const char *materialName, bool *pFound, bool bComplain = true );
  25. void GetMaterialDimensions( MaterialSystemMaterial_t materialHandle, int *width, int *height );
  26. int GetMaterialShaderPropertyBool( MaterialSystemMaterial_t materialHandle, int propID );
  27. int GetMaterialShaderPropertyInt( MaterialSystemMaterial_t materialHandle, int propID );
  28. const char *GetMaterialVar( MaterialSystemMaterial_t materialHandle, const char *propertyName );
  29. void GetMaterialReflectivity( MaterialSystemMaterial_t materialHandle, float *reflectivityVect );
  30. const char *GetMaterialShaderName( MaterialSystemMaterial_t materialHandle );
  31. #endif // UTILMATLIB_H