diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 120cf8d5d..de9c1f6e4 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -1099,6 +1099,7 @@ UINT32 HWR_GetLightTableID(extracolormap_t *colormap) void HWR_ClearLightTables(void) { //if (vid.glstate == VID_GL_LIBRARY_LOADED) + if (rendermode == render_opengl) HWD.pfnClearLightTables(); } diff --git a/src/r_data.c b/src/r_data.c index 20fe19f93..5df336f88 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -28,7 +28,6 @@ #ifdef HWRENDER #include "hardware/hw_main.h" - #include "hardware/hw_glob.h" // HWR_ClearLightTables #endif @@ -1141,7 +1140,8 @@ void R_ClearColormaps(void) memset(extra_colormaps, 0, sizeof (extra_colormaps)); #ifdef HWRENDER - HWR_ClearLightTables(); + if (rendermode == render_opengl) + HWR_ClearLightTables(); #endif }