Team Fortress 2 Source Code as on 22/4/2020
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.

52 lines
1.7 KiB

  1. //========= Copyright 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. void FASTCALL R_RenderDynamicLightmaps( dlight_t *pLights, ICallQueue *pCallQueue, SurfaceHandle_t surfID, const matrix3x4_t& entityToWorld );
  35. int R_AddLightmapPolyChain( SurfaceHandle_t surfID );
  36. int R_AddLightmapSurfaceChain( SurfaceHandle_t surfID );
  37. void R_SetLightmapBlendingMode( void );
  38. extern Vector4D blocklights[NUM_BUMP_VECTS+1][ MAX_LIGHTMAP_DIM_INCLUDING_BORDER * MAX_LIGHTMAP_DIM_INCLUDING_BORDER ];
  39. #endif // GL_LIGHTMAP_H