summaryrefslogtreecommitdiff
path: root/engine/Overlay.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/Overlay.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'engine/Overlay.h')
-rw-r--r--engine/Overlay.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/engine/Overlay.h b/engine/Overlay.h
new file mode 100644
index 0000000..d9e15ae
--- /dev/null
+++ b/engine/Overlay.h
@@ -0,0 +1,65 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Model loading / unloading interface
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef OVERLAY_H
+#define OVERLAY_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+// This is a workaround for the fact that we get massive decal flicker
+// when looking at a decal at a glancing angle while standing right next to it.
+#define OVERLAY_AVOID_FLICKER_NORMAL_OFFSET 0.1f
+
+
+//-----------------------------------------------------------------------------
+// Overlay fragments
+//-----------------------------------------------------------------------------
+typedef unsigned short OverlayFragmentHandle_t;
+
+enum
+{
+ OVERLAY_FRAGMENT_INVALID = (OverlayFragmentHandle_t)~0
+};
+
+
+//=============================================================================
+//
+// Overlay Manager Interface
+//
+class IOverlayMgr
+{
+public:
+ // Memory allocation/de-allocation.
+ virtual bool LoadOverlays( ) = 0;
+ virtual void UnloadOverlays( ) = 0;
+
+ virtual void CreateFragments( void ) = 0;
+
+ virtual void ReSortMaterials( void ) = 0;
+
+ // Drawing
+ // clears all
+ virtual void ClearRenderLists() = 0;
+ // clears a particular sort group
+ virtual void ClearRenderLists( int nSortGroup ) = 0;
+ virtual void AddFragmentListToRenderList( int nSortGroup, OverlayFragmentHandle_t iFragment, bool bDisp ) = 0;
+ virtual void RenderOverlays( int nSortGroup ) = 0;
+
+ // Sets the client renderable for an overlay's material proxy to bind to
+ virtual void SetOverlayBindProxy( int iOverlayID, void *pBindProxy ) = 0;
+};
+
+
+//-----------------------------------------------------------------------------
+// Overlay manager singleton
+//-----------------------------------------------------------------------------
+IOverlayMgr *OverlayMgr();
+
+#endif // OVERLAY_H