X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fpipelinestate.cpp;h=262dd26b596b95fb600aea40d5995d0fe08fd56e;hb=bae374a3cda6a1b59f36016624ef518bf2676355;hp=97f353dcee8b572c835e1ac5569ca9769489b246;hpb=e6077f9f25b794c174e1017c2c0763e77a6fddda;p=libs%2Fgl.git diff --git a/source/core/pipelinestate.cpp b/source/core/pipelinestate.cpp index 97f353dc..262dd26b 100644 --- a/source/core/pipelinestate.cpp +++ b/source/core/pipelinestate.cpp @@ -322,9 +322,14 @@ void PipelineState::apply(unsigned mask) const glBlendEquation(get_gl_blend_equation(blend->equation)); glBlendFunc(get_gl_blend_factor(blend->src_factor), get_gl_blend_factor(blend->dst_factor)); glBlendColor(blend->constant.r, blend->constant.g, blend->constant.b, blend->constant.a); + ColorWriteMask cw = blend->write_mask; + glColorMask((cw&WRITE_RED)!=0, (cw&WRITE_GREEN)!=0, (cw&WRITE_BLUE)!=0, (cw&WRITE_ALPHA)!=0); } else + { glDisable(GL_BLEND); + glColorMask(true, true, true, true); + } } last_applied = this;