X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fpipelinestate_backend.cpp;h=204e8139f0fc70802aaf3592b68a60779a124bae;hb=9eb9f592d37e9a1e05c2ff70887a1c5f26b98864;hp=a2b8ab32717555bc329b85a515f2b58818738ff0;hpb=2a70fecfbbe8708be2bdaa75d222dd5a889a8ed3;p=libs%2Fgl.git diff --git a/source/backends/opengl/pipelinestate_backend.cpp b/source/backends/opengl/pipelinestate_backend.cpp index a2b8ab32..204e8139 100644 --- a/source/backends/opengl/pipelinestate_backend.cpp +++ b/source/backends/opengl/pipelinestate_backend.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include "blend.h" @@ -180,6 +181,13 @@ void OpenGLPipelineState::apply() const } } + if(changes&PipelineState::PATCH_SIZE) + if(self.patch_size) + { + static Require _req(ARB_tessellation_shader); + glPatchParameteri(GL_PATCH_VERTICES, self.patch_size); + } + if(changes&PipelineState::FACE_CULL) { glFrontFace(self.front_face==CLOCKWISE ? GL_CW : GL_CCW); @@ -237,6 +245,11 @@ void OpenGLPipelineState::apply() const glDisable(GL_BLEND); glColorMask(true, true, true, true); } + + if(blend.alpha_to_coverage && self.framebuffer && self.framebuffer->get_format().get_samples()>1) + glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE); + else + glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE); } applied_to = &device;