diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/ibsplighting.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/ibsplighting.h')
| -rw-r--r-- | hammer/ibsplighting.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/hammer/ibsplighting.h b/hammer/ibsplighting.h new file mode 100644 index 0000000..506bad4 --- /dev/null +++ b/hammer/ibsplighting.h @@ -0,0 +1,59 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef IBSPLIGHTING_H +#define IBSPLIGHTING_H +#ifdef _WIN32 +#pragma once +#endif + + +class IBSPLighting +{ +public: + + virtual ~IBSPLighting() {} + virtual void Release() = 0; + + // Init for incremental lighting. + // - load the VRAD DLL + // - load the BSP file into it + // - start the incremental lighting thread + // - start lighting in the background if need be + virtual bool Load( char const *pFilename ) = 0; + + // Shutdown everything (but keep the object around). + virtual void Term() = 0; + + // Serialize the r0 and bsp files if any new lighting has been completed. + // Note: this will return false if a lighting pass is currently in progress + // (don't worry though - Term() will stop an active lighting pass and + // serialize the lighting). + virtual bool Serialize() = 0; + + // Start lighting in the background thread using the current state of the + // entities in the editor's memory. + virtual void StartLighting( char const *pVMFFileWithEnts ) = 0; + + // Returns a 0-1 value describing how far along the lighting is, or -1 if not lighting. + virtual float GetPercentComplete() = 0; + + // Stop the lighting process. + virtual void Interrupt() = 0; + + // This should be called during idle time. If it returns true, then it has + // update all the lightmaps and the views should be redrawn. + virtual bool CheckForNewLightmaps() = 0; + + // Render the current lightmaps. + virtual void Draw() = 0; +}; + +IBSPLighting* CreateBSPLighting(); + + +#endif // IBSPLIGHTING_H |