blob: de476009ae2d6bcc7b2473481a343ca5d97772f2 (
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef IBSPLIGHTING_THREAD_H
#define IBSPLIGHTING_THREAD_H
#ifdef _WIN32
#pragma once
#endif
#include "ivraddll.h"
class IBSPLightingThread
{
public:
enum
{
STATE_IDLE=0,
STATE_LIGHTING=1,
STATE_FINISHED=2
};
virtual ~IBSPLightingThread() {}
virtual void Release() = 0;
// Start processing light in the background thread.
//
// Goes to STATE_LIGHTING, then if it's successful, it goes to STATE_FINISHED.
// If unsuccessful or interrupted, it goes to STATE_IDLE.
//
// If this is called while it's already lighting, it stops the current lighting
// process and restarts.
virtual void StartLighting( char const *pVMFFileWithEntities ) = 0;
// Returns one of the STATE_ defines.
virtual int GetCurrentState() = 0;
// If lighting is in progress, make it stop.
virtual void Interrupt() = 0;
// Returns IVRadDLL::GetPercentComplete if it's lighting.
virtual float GetPercentComplete() = 0;
};
IBSPLightingThread* CreateBSPLightingThread( IVRadDLL *pDLL );
#endif // IBSPLIGHTING_THREAD_H
|