summaryrefslogtreecommitdiff
path: root/utils/studiomdl/hardwarevertexcache.h
blob: a9eb2a50120317836ae59824dcbd531203aef34d (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef HARDWAREVERTEXCACHE_H
#define HARDWAREVERTEXCACHE_H
#ifdef _WIN32
#pragma once
#endif

// emulate a hardware post T&L vertex fifo

class CHardwareVertexCache
{
public:
	CHardwareVertexCache();
	void Init( int size );
	void Insert( int index );
	bool IsPresent( int index );
	void Flush( void );
	void Print( void );
private:
	int m_Size;
	int *m_Fifo;
	int m_HeadIndex;
	int m_NumEntries;
};

#endif // HARDWAREVERTEXCACHE_H