Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IBSPLIGHTING_THREAD_H
  8. #define IBSPLIGHTING_THREAD_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "ivraddll.h"
  13. class IBSPLightingThread
  14. {
  15. public:
  16. enum
  17. {
  18. STATE_IDLE=0,
  19. STATE_LIGHTING=1,
  20. STATE_FINISHED=2
  21. };
  22. virtual ~IBSPLightingThread() {}
  23. virtual void Release() = 0;
  24. // Start processing light in the background thread.
  25. //
  26. // Goes to STATE_LIGHTING, then if it's successful, it goes to STATE_FINISHED.
  27. // If unsuccessful or interrupted, it goes to STATE_IDLE.
  28. //
  29. // If this is called while it's already lighting, it stops the current lighting
  30. // process and restarts.
  31. virtual void StartLighting( char const *pVMFFileWithEntities ) = 0;
  32. // Returns one of the STATE_ defines.
  33. virtual int GetCurrentState() = 0;
  34. // If lighting is in progress, make it stop.
  35. virtual void Interrupt() = 0;
  36. // Returns IVRadDLL::GetPercentComplete if it's lighting.
  37. virtual float GetPercentComplete() = 0;
  38. };
  39. IBSPLightingThread* CreateBSPLightingThread( IVRadDLL *pDLL );
  40. #endif // IBSPLIGHTING_THREAD_H