From: Mikko Rasa Date: Wed, 18 Aug 2021 14:00:01 +0000 (+0300) Subject: Some fixes to applying pipeline state X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=8e063e6def7412f85a26f829b641f28d3476062f Some fixes to applying pipeline state --- 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) {