From 0ffcbff30340d42b1d30b9f72ca66f16dbc4465d Mon Sep 17 00:00:00 2001 From: nillerusr Date: Tue, 7 Feb 2023 02:05:00 +0300 Subject: [PATCH] materialsystem: fix rendering bugs with togl --- materialsystem/cmaterialsystem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/materialsystem/cmaterialsystem.cpp b/materialsystem/cmaterialsystem.cpp index 2293af42..e7870712 100644 --- a/materialsystem/cmaterialsystem.cpp +++ b/materialsystem/cmaterialsystem.cpp @@ -1881,7 +1881,13 @@ void CMaterialSystem::ReadConfigFromConVars( MaterialSystem_Config_t *pConfig ) pConfig->bMipMapTextures = mat_mipmaptextures.GetInt() ? true : false; pConfig->nShowMipLevels = mat_showmiplevels.GetInt(); pConfig->bReverseDepth = mat_reversedepth.GetInt() ? true : false; + +#ifdef DX_TO_GL_ABSTRACTION + pConfig->bBufferPrimitives = false; // nillerusr: causes rendering bugs and sefaults with nvidia driver +#else pConfig->bBufferPrimitives = mat_bufferprimitives.GetInt() ? true : false; +#endif + pConfig->bDrawFlat = mat_drawflat.GetInt() ? true : false; pConfig->bSoftwareLighting = mat_softwarelighting.GetInt() ? true : false; pConfig->proxiesTestMode = mat_proxy.GetInt();