From 8d9d3d5f8fe0f0bde0a366fe720124150cea5447 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 13 Oct 2021 00:09:18 +0200 Subject: [PATCH] - disabled palette emulation for the GLES backend. Right now the shader does not support it and will require significant redesign to work well with the target hardware. --- source/core/rendering/hw_entrypoint.cpp | 3 ++- source/glbackend/glbackend.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/core/rendering/hw_entrypoint.cpp b/source/core/rendering/hw_entrypoint.cpp index 548a3a171..a9dd0cb1a 100644 --- a/source/core/rendering/hw_entrypoint.cpp +++ b/source/core/rendering/hw_entrypoint.cpp @@ -53,6 +53,7 @@ #include "gamehud.h" EXTERN_CVAR(Bool, cl_capfps) +EXTERN_CVAR(Int, vid_preferbackend) PalEntry GlobalMapFog; float GlobalFogDensity = 350.f; @@ -118,7 +119,7 @@ void RenderViewpoint(FRenderViewpoint& mainvp, IntRect* bounds, float fov, float auto vrmode = VRMode::GetVRMode(mainview && toscreen); const int eyeCount = vrmode->mEyeCount; screen->FirstEye(); - hw_int_useindexedcolortextures = eyeCount > 1? false : *hw_useindexedcolortextures; + hw_int_useindexedcolortextures = eyeCount > 1 || vid_preferbackend == 3? false : *hw_useindexedcolortextures; for (int eye_ix = 0; eye_ix < eyeCount; ++eye_ix) { diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index 724c508c7..a88ddc97d 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -54,6 +54,7 @@ #include "gamehud.h" CVARD(Bool, hw_hightile, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable hightile texture rendering") +EXTERN_CVAR(Int, vid_preferbackend) bool hw_int_useindexedcolortextures; CUSTOM_CVARD(Bool, hw_useindexedcolortextures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable indexed color texture rendering") { @@ -98,7 +99,7 @@ void GLInstance::DoDraw() if (rendercommands.Size() > 0) { - if (!useMapFog) hw_int_useindexedcolortextures = hw_useindexedcolortextures; + if (!useMapFog && vid_preferbackend != 3) hw_int_useindexedcolortextures = hw_useindexedcolortextures; lastState.Flags = ~rendercommands[0].StateFlags; // Force ALL flags to be considered 'changed'. lastState.DepthFunc = INT_MIN; // Something totally invalid.