diff --git a/src/engine/renderer/Material.cpp b/src/engine/renderer/Material.cpp index 1070522b60..9093b92fb1 100644 --- a/src/engine/renderer/Material.cpp +++ b/src/engine/renderer/Material.cpp @@ -1486,6 +1486,8 @@ void MaterialSystem::ProcessStage( drawSurf_t* drawSurf, shaderStage_t* pStage, * A material represents a distinct global OpenGL state (e. g. blend function, depth test, depth write etc.) * Materials can have a dependency on other materials to make sure that consecutive stages are rendered in the proper order */ void MaterialSystem::GenerateWorldMaterials() { + R_SyncRenderThread(); + const int current_r_nocull = r_nocull->integer; const int current_r_drawworld = r_drawworld->integer; r_nocull->integer = 1; @@ -1494,8 +1496,6 @@ void MaterialSystem::GenerateWorldMaterials() { Log::Debug( "Generating world materials" ); - R_SyncRenderThread(); - ++tr.viewCountNoReset; R_AddWorldSurfaces();