blob: d9e15aed05a106fc89fb9e30fcdabaf6f2b01440 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
|