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.

53 lines
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //=============================================================================//
  9. #ifndef GL_LIGHTMAP_H
  10. #define GL_LIGHTMAP_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #include "surfacehandle.h"
  15. #define MAX_LIGHTMAPS 256
  16. // NOTE: This is used for a hack that deals with viewmodels creating dlights
  17. // behind walls
  18. #define DLIGHT_BEHIND_PLANE_DIST -15
  19. extern bool g_RebuildLightmaps;
  20. extern int r_dlightactive;
  21. // Marks dlights as visible or not visible
  22. void R_MarkDLightVisible( int dlight );
  23. void R_MarkDLightNotVisible( int dlight );
  24. // Must call these at the start + end of rendering each view
  25. void R_DLightStartView();
  26. void R_DLightEndView();
  27. // Can we use another dynamic light, or is it just too expensive?
  28. bool R_CanUseVisibleDLight( int dlight );
  29. struct msurfacelighting_t;
  30. void R_AddDynamicLights( SurfaceHandle_t surfID, msurfacelighting_t *pLighting, const matrix3x4_t& entityToWorld );
  31. void R_BuildLightMap( struct dlight_t *pLights, class ICallQueue *pCallQueue, SurfaceHandle_t surfID, const matrix3x4_t& entityToWorld );
  32. void R_RedownloadAllLightmaps();
  33. void GL_RebuildLightmaps( void );
  34. int R_AddLightmapPolyChain( SurfaceHandle_t surfID );
  35. int R_AddLightmapSurfaceChain( SurfaceHandle_t surfID );
  36. void R_SetLightmapBlendingMode( void );
  37. void R_CheckForLightmapUpdates( SurfaceHandle_t surfID, int nTransformIndex );
  38. void R_BuildLightmapUpdateList();
  39. extern ALIGN128 Vector4D blocklights[NUM_BUMP_VECTS+1][ MAX_LIGHTMAP_DIM_INCLUDING_BORDER * MAX_LIGHTMAP_DIM_INCLUDING_BORDER ];
  40. #endif // GL_LIGHTMAP_H