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.

47 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "materialsystem/imaterialproxy.h"
  9. #include "materialsystem/imaterial.h"
  10. // memdbgon must be the last include file in a .cpp file!!!
  11. #include "tier0/memdbgon.h"
  12. class CDummyMaterialProxy : public IMaterialProxy
  13. {
  14. public:
  15. CDummyMaterialProxy();
  16. virtual ~CDummyMaterialProxy();
  17. virtual bool Init( IMaterial *pMaterial, KeyValues *pKeyValues );
  18. virtual void OnBind( void *pC_BaseEntity );
  19. virtual void Release( void ) { delete this; }
  20. virtual IMaterial *GetMaterial() { return NULL; }
  21. };
  22. CDummyMaterialProxy::CDummyMaterialProxy()
  23. {
  24. DevMsg( 1, "CDummyMaterialProxy::CDummyMaterialProxy()\n" );
  25. }
  26. CDummyMaterialProxy::~CDummyMaterialProxy()
  27. {
  28. DevMsg( 1, "CDummyMaterialProxy::~CDummyMaterialProxy()\n" );
  29. }
  30. bool CDummyMaterialProxy::Init( IMaterial *pMaterial, KeyValues *pKeyValues )
  31. {
  32. DevMsg( 1, "CDummyMaterialProxy::Init( material = \"%s\" )\n", pMaterial->GetName() );
  33. return true;
  34. }
  35. void CDummyMaterialProxy::OnBind( void *pC_BaseEntity )
  36. {
  37. DevMsg( 1, "CDummyMaterialProxy::OnBind( %p )\n", pC_BaseEntity );
  38. }
  39. EXPOSE_INTERFACE( CDummyMaterialProxy, IMaterialProxy, "Dummy" IMATERIAL_PROXY_INTERFACE_VERSION );