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.

59 lines
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IBSPLIGHTING_H
  8. #define IBSPLIGHTING_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. class IBSPLighting
  13. {
  14. public:
  15. virtual ~IBSPLighting() {}
  16. virtual void Release() = 0;
  17. // Init for incremental lighting.
  18. // - load the VRAD DLL
  19. // - load the BSP file into it
  20. // - start the incremental lighting thread
  21. // - start lighting in the background if need be
  22. virtual bool Load( char const *pFilename ) = 0;
  23. // Shutdown everything (but keep the object around).
  24. virtual void Term() = 0;
  25. // Serialize the r0 and bsp files if any new lighting has been completed.
  26. // Note: this will return false if a lighting pass is currently in progress
  27. // (don't worry though - Term() will stop an active lighting pass and
  28. // serialize the lighting).
  29. virtual bool Serialize() = 0;
  30. // Start lighting in the background thread using the current state of the
  31. // entities in the editor's memory.
  32. virtual void StartLighting( char const *pVMFFileWithEnts ) = 0;
  33. // Returns a 0-1 value describing how far along the lighting is, or -1 if not lighting.
  34. virtual float GetPercentComplete() = 0;
  35. // Stop the lighting process.
  36. virtual void Interrupt() = 0;
  37. // This should be called during idle time. If it returns true, then it has
  38. // update all the lightmaps and the views should be redrawn.
  39. virtual bool CheckForNewLightmaps() = 0;
  40. // Render the current lightmaps.
  41. virtual void Draw() = 0;
  42. };
  43. IBSPLighting* CreateBSPLighting();
  44. #endif // IBSPLIGHTING_H