]> git.tdb.fi Git - libs/gl.git/commitdiff
Some fixes to applying pipeline state
authorMikko Rasa <tdb@tdb.fi>
Wed, 18 Aug 2021 14:00:01 +0000 (17:00 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 18 Aug 2021 14:13:53 +0000 (17:13 +0300)
source/core/pipelinestate.cpp

index 66188d910c085f9ecafffae6467c43358393d95d..673fa701e6cb6c5d5860648bab880cda117a2a87 100644 (file)
@@ -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<BoundTexture>::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<BoundUniformBlock>::const_iterator i=uniform_blocks.begin(); i!=uniform_blocks.end(); ++i)
-                       if(i->changed)
+                       if(i->changed || mask==~0U)
                        {
                                if(i->block)
                                {