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.

68 lines
2.0 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Model loading / unloading interface
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef OVERLAY_H
  8. #define OVERLAY_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. // This is a workaround for the fact that we get massive decal flicker
  13. // when looking at a decal at a glancing angle while standing right next to it.
  14. #define OVERLAY_AVOID_FLICKER_NORMAL_OFFSET 0.1f
  15. //-----------------------------------------------------------------------------
  16. // Overlay fragments
  17. //-----------------------------------------------------------------------------
  18. typedef unsigned short OverlayFragmentHandle_t;
  19. enum
  20. {
  21. OVERLAY_FRAGMENT_INVALID = (OverlayFragmentHandle_t)~0
  22. };
  23. //=============================================================================
  24. //
  25. // Overlay Manager Interface
  26. //
  27. class IOverlayMgr
  28. {
  29. public:
  30. // Memory allocation/de-allocation.
  31. virtual bool LoadOverlays( ) = 0;
  32. virtual void UnloadOverlays( ) = 0;
  33. virtual void CreateFragments( void ) = 0;
  34. virtual void ReSortMaterials( void ) = 0;
  35. // Drawing
  36. // clears all
  37. virtual void ClearRenderLists() = 0;
  38. // clears a particular sort group
  39. virtual void ClearRenderLists( int nSortGroup ) = 0;
  40. virtual void AddFragmentListToRenderList( int nSortGroup, OverlayFragmentHandle_t iFragment, bool bDisp ) = 0;
  41. virtual void RenderOverlays( IMatRenderContext *pRenderContext, int nSortGroup ) = 0;
  42. // Sets the client renderable for an overlay's material proxy to bind to
  43. virtual void SetOverlayBindProxy( int iOverlayID, void *pBindProxy ) = 0;
  44. virtual void UpdateOverlayRenderLevels( int nCPULevel, int nGPULevel ) = 0;
  45. virtual void RenderAllUnlitOverlays( IMatRenderContext *pRenderContext, int nSortGroup ) = 0;
  46. };
  47. //-----------------------------------------------------------------------------
  48. // Overlay manager singleton
  49. //-----------------------------------------------------------------------------
  50. IOverlayMgr *OverlayMgr();
  51. #endif // OVERLAY_H