From c07a4461a0afa0bc3c74b7aa34356a1e76d138de Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 30 Jul 2017 10:44:49 -0400 Subject: [PATCH] - fixed: GetCaps() did not account for r_drawvoxels cvar --- src/gl/scene/gl_scene.cpp | 5 ++++- src/swrenderer/r_swrenderer.cpp | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 681af98a6..9b2792d65 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -85,6 +85,7 @@ EXTERN_CVAR (Bool, r_deathcamera) EXTERN_CVAR (Float, underwater_fade_scalar) EXTERN_CVAR (Float, r_visibility) EXTERN_CVAR (Bool, gl_legacy_mode) +EXTERN_CVAR (Bool, r_drawvoxels) extern bool NoInterpolateView; @@ -1166,7 +1167,9 @@ uint32_t FGLInterface::GetCaps() { // describe our basic feature set ActorRenderFeatureFlags FlagSet = RFF_FLATSPRITES | RFF_MODELS | RFF_SLOPE3DFLOORS | - RFF_TILTPITCH | RFF_ROLLSPRITES | RFF_POLYGONAL | RFF_VOXELS; + RFF_TILTPITCH | RFF_ROLLSPRITES | RFF_POLYGONAL; + if (r_drawvoxels) + FlagSet |= RFF_VOXELS; if (gl_legacy_mode) { // legacy mode always has truecolor because palette tonemap is not available diff --git a/src/swrenderer/r_swrenderer.cpp b/src/swrenderer/r_swrenderer.cpp index fec82c30e..ddbc12fa1 100644 --- a/src/swrenderer/r_swrenderer.cpp +++ b/src/swrenderer/r_swrenderer.cpp @@ -60,7 +60,8 @@ CUSTOM_CVAR (Bool, cl_oldfreelooklimit, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG } EXTERN_CVAR(Bool, r_shadercolormaps) -EXTERN_CVAR(Float, maxviewpitch) // [SP] CVAR from GZDoom +EXTERN_CVAR(Float, maxviewpitch) // [SP] CVAR from OpenGL Renderer +EXTERN_CVAR(Bool, r_drawvoxels) CUSTOM_CVAR(Bool, r_polyrenderer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) { @@ -385,7 +386,7 @@ uint32_t FSoftwareRenderer::GetCaps() if (r_polyrenderer) FlagSet |= RFF_POLYGONAL | RFF_TILTPITCH; - else + else if (r_drawvoxels) FlagSet |= RFF_VOXELS; if (screen && screen->IsBgra())