X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fpipelinestate_backend.cpp;h=da5f495712408926bde3f9445349b383009c819c;hb=ea689bc784d3cda28c2b1b558a294fe52236f7dd;hp=8ffa47fcda75d8ea44e9ff9e74673ca54f43a21a;hpb=4595453156db0c47926946b0ea1732b1e37e70ce;p=libs%2Fgl.git diff --git a/source/backends/opengl/pipelinestate_backend.cpp b/source/backends/opengl/pipelinestate_backend.cpp index 8ffa47fc..da5f4957 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); @@ -244,6 +252,11 @@ void OpenGLPipelineState::apply() const glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE); } +#ifdef DEBUG + if(changes&(PipelineState::SHPROG|PipelineState::RESOURCES)) + self.check_bound_resources(); +#endif + applied_to = &device; dev_state.last_pipeline = this; changes = 0;