X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fpipelinestate_backend.h;h=9198706c7344d7f23f4369f3ddc8208598dcfbd5;hb=HEAD;hp=24ef6989fb6de1a2968a27660315f0221fad53ab;hpb=160e9eea29bd10034733d59507fa1bcca36be401;p=libs%2Fgl.git diff --git a/source/backends/opengl/pipelinestate_backend.h b/source/backends/opengl/pipelinestate_backend.h index 24ef6989..9198706c 100644 --- a/source/backends/opengl/pipelinestate_backend.h +++ b/source/backends/opengl/pipelinestate_backend.h @@ -7,23 +7,24 @@ namespace Msp { namespace GL { +class Device; + class OpenGLPipelineState: public NonCopyable { friend class OpenGLCommands; protected: - static const OpenGLPipelineState *last_applied; - static std::vector bound_tex_targets; - static std::vector bound_uniform_blocks; - static unsigned restart_index; + mutable Device *applied_to = 0; + mutable unsigned changes = 0; - OpenGLPipelineState(); + OpenGLPipelineState() = default; + OpenGLPipelineState(OpenGLPipelineState &&) { } ~OpenGLPipelineState(); + static bool can_bind_tex_level(unsigned l) { return l==0; } + void apply() const; -private: - void apply(unsigned) const; -protected: + static void clear(); };