From 8e063e6def7412f85a26f829b641f28d3476062f Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 18 Aug 2021 17:00:01 +0300 Subject: [PATCH] Some fixes to applying pipeline state --- source/core/pipelinestate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/core/pipelinestate.cpp b/source/core/pipelinestate.cpp index 66188d91..673fa701 100644 --- a/source/core/pipelinestate.cpp +++ b/source/core/pipelinestate.cpp @@ -135,7 +135,7 @@ void PipelineState::apply(unsigned mask) const { glFrontFace(front_face==CLOCKWISE ? GL_CW : GL_CCW); - if(face_cull!=NO_CULL) + if(face_cull!=NO_CULL && front_face!=NON_MANIFOLD) { glEnable(GL_CULL_FACE); glCullFace(face_cull==CULL_FRONT ? GL_FRONT : GL_BACK); @@ -188,7 +188,7 @@ void PipelineState::apply(unsigned mask) const } for(vector::const_iterator i=textures.begin(); i!=textures.end(); ++i) - if(i->changed) + if(i->changed || mask==~0U) { if(i->texture && i->sampler) { @@ -245,7 +245,7 @@ void PipelineState::apply(unsigned mask) const } for(vector::const_iterator i=uniform_blocks.begin(); i!=uniform_blocks.end(); ++i) - if(i->changed) + if(i->changed || mask==~0U) { if(i->block) { -- 2.45.2