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.3 KiB

  1. //========= Copyright � 1996-2005, 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. #include "imaterialproxydict.h"
  11. // memdbgon must be the last include file in a .cpp file!!!
  12. #include "tier0/memdbgon.h"
  13. class CDummyMaterialProxy : public IMaterialProxy
  14. {
  15. public:
  16. CDummyMaterialProxy();
  17. virtual ~CDummyMaterialProxy();
  18. virtual bool Init( IMaterial *pMaterial, KeyValues *pKeyValues );
  19. virtual void OnBind( void *pC_BaseEntity );
  20. virtual void Release( void ) { delete this; }
  21. virtual IMaterial *GetMaterial() { return NULL; }
  22. };
  23. CDummyMaterialProxy::CDummyMaterialProxy()
  24. {
  25. DevMsg( 1, "CDummyMaterialProxy::CDummyMaterialProxy()\n" );
  26. }
  27. CDummyMaterialProxy::~CDummyMaterialProxy()
  28. {
  29. DevMsg( 1, "CDummyMaterialProxy::~CDummyMaterialProxy()\n" );
  30. }
  31. bool CDummyMaterialProxy::Init( IMaterial *pMaterial, KeyValues *pKeyValues )
  32. {
  33. DevMsg( 1, "CDummyMaterialProxy::Init( material = \"%s\" )\n", pMaterial->GetName() );
  34. return true;
  35. }
  36. void CDummyMaterialProxy::OnBind( void *pC_BaseEntity )
  37. {
  38. DevMsg( 1, "CDummyMaterialProxy::OnBind( %p )\n", pC_BaseEntity );
  39. }
  40. EXPOSE_MATERIAL_PROXY( CDummyMaterialProxy, Dummy );