From 702c7bd63d3adae9f4b75d333af4a98fe3fd768b Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 12 Sep 2024 19:18:40 +0200 Subject: [PATCH 1/2] Fix -opengl parameter crash --- src/hardware/hw_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 2a886a1c6..9cfeaeeb2 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5605,7 +5605,7 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player) // Can't have palette rendering if shaders are disabled. boolean HWR_ShouldUsePaletteRendering(void) { - return (cv_glpaletterendering.value && HWR_UseShader()); + return (pMasterPalette != NULL && cv_glpaletterendering.value && HWR_UseShader()); } // enable or disable palette rendering state depending on settings and availability From 4bb857b0ecfaf4982b87dfe0d350706b17650368 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 25 Jun 2024 17:23:05 +0200 Subject: [PATCH 2/2] Enable OpenGL palette rendering by default --- src/hardware/hw_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 9cfeaeeb2..e208a91b6 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5722,7 +5722,7 @@ consvar_t cv_glbatching = CVAR_INIT ("gr_batching", "On", 0, CV_OnOff, NULL); static CV_PossibleValue_t glpalettedepth_cons_t[] = {{16, "16 bits"}, {24, "24 bits"}, {0, NULL}}; -consvar_t cv_glpaletterendering = CVAR_INIT ("gr_paletterendering", "Off", CV_SAVE|CV_CALL, CV_OnOff, CV_glpaletterendering_OnChange); +consvar_t cv_glpaletterendering = CVAR_INIT ("gr_paletterendering", "On", CV_SAVE|CV_CALL, CV_OnOff, CV_glpaletterendering_OnChange); consvar_t cv_glpalettedepth = CVAR_INIT ("gr_palettedepth", "16 bits", CV_SAVE|CV_CALL, glpalettedepth_cons_t, CV_glpalettedepth_OnChange); #define ONLY_IF_GL_LOADED if (vid.glstate != VID_GL_LIBRARY_LOADED) return;