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.

46 lines
1.6 KiB

  1. //===================== Copyright (c) Valve Corporation. All Rights Reserved. ======================
  2. //
  3. // Example shader that can be applied to models
  4. //
  5. //==================================================================================================
  6. #ifndef EXAMPLE_MODEL_DX9_HELPER_H
  7. #define EXAMPLE_MODEL_DX9_HELPER_H
  8. #include <string.h>
  9. //-----------------------------------------------------------------------------
  10. // Forward declarations
  11. //-----------------------------------------------------------------------------
  12. class CBaseVSShader;
  13. class IMaterialVar;
  14. class IShaderDynamicAPI;
  15. class IShaderShadow;
  16. //-----------------------------------------------------------------------------
  17. // Init params/ init/ draw methods
  18. //-----------------------------------------------------------------------------
  19. struct ExampleModel_DX9_Vars_t
  20. {
  21. ExampleModel_DX9_Vars_t() { memset( this, 0xFF, sizeof(*this) ); }
  22. int m_nBaseTexture;
  23. int m_nBaseTextureFrame;
  24. int m_nBaseTextureTransform;
  25. int m_nAlphaTestReference;
  26. int m_nFlashlightTexture;
  27. int m_nFlashlightTextureFrame;
  28. };
  29. void InitParamsExampleModel_DX9( CBaseVSShader *pShader, IMaterialVar** params,
  30. const char *pMaterialName, ExampleModel_DX9_Vars_t &info );
  31. void InitExampleModel_DX9( CBaseVSShader *pShader, IMaterialVar** params,
  32. ExampleModel_DX9_Vars_t &info );
  33. void DrawExampleModel_DX9( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
  34. IShaderShadow* pShaderShadow,
  35. ExampleModel_DX9_Vars_t &info, VertexCompressionType_t vertexCompression,
  36. CBasePerMaterialContextData **pContextDataPtr );
  37. #endif // EXAMPLE_MODEL_DX9_HELPER_H