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.

67 lines
1.5 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef RUNTIMEDEMO3_H
  8. #define RUNTIMEDEMO3_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "materialsystem/materialsystemutil.h"
  13. #include "tier1/utlvector.h"
  14. #include "dmxloader/dmxelement.h"
  15. //-----------------------------------------------------------------------------
  16. // Nothing in this file changed from Demo 2
  17. //-----------------------------------------------------------------------------
  18. class CQuadV3
  19. {
  20. // NOTE: This is necessary to allow the fast dmx unpacker to work
  21. DECLARE_DMXELEMENT_UNPACK();
  22. public:
  23. CQuadV3() { m_x0 = m_x1 = m_y0 = m_y1 = 0; m_Color.r = m_Color.g = m_Color.g = m_Color.a = 255; }
  24. int m_x0;
  25. int m_x1;
  26. int m_y0;
  27. int m_y1;
  28. color32 m_Color;
  29. };
  30. //-----------------------------------------------------------------------------
  31. // Quad manager class
  32. //-----------------------------------------------------------------------------
  33. class CQuadManagerV3
  34. {
  35. public:
  36. // Init, shutdown
  37. void Init();
  38. void Shutdown();
  39. // Loads from a DMX file
  40. bool Unserialize( CUtlBuffer &buf );
  41. // Quad management
  42. CQuadV3* AddQuad( );
  43. void RemoveQuad( CQuadV3* pQuad );
  44. void RemoveAllQuads();
  45. // Quad rendering
  46. void DrawQuads();
  47. private:
  48. CUtlVector< CQuadV3 * > m_Quads;
  49. CMaterialReference m_Material;
  50. };
  51. extern CQuadManagerV3 *g_pQuadManagerV3;
  52. #endif // RUNTIMEDEMO3_H