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.

38 lines
1.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IMATERIALPROXY_H
  8. #define IMATERIALPROXY_H
  9. #pragma once
  10. #include "interface.h"
  11. #define IMATERIAL_PROXY_INTERFACE_VERSION "_IMaterialProxy003"
  12. class IMaterial;
  13. class KeyValues;
  14. abstract_class IMaterialProxy
  15. {
  16. public:
  17. virtual bool Init( IMaterial* pMaterial, KeyValues *pKeyValues ) = 0;
  18. virtual void OnBind( void * ) = 0;
  19. virtual void Release() = 0;
  20. virtual IMaterial * GetMaterial() = 0;
  21. // Is this material proxy allowed to be called in the async thread? Most are no, a few are yes.
  22. // This could be converted from a true interface to having a single bool that gets set at construction
  23. // time for this. I'm considering it because this gets called on the hot path, but it's probably not
  24. // worth it now.
  25. virtual bool CanBeCalledAsync() const { return false; }
  26. protected:
  27. // no one should call this directly
  28. virtual ~IMaterialProxy() {}
  29. };
  30. #endif // IMATERIALPROXY_H