X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fpipelinestate.h;fp=source%2Fcore%2Fpipelinestate.h;h=42543e4dc2596f5de2e2c0a7c71e85f9b64fa4c8;hb=160e9eea29bd10034733d59507fa1bcca36be401;hp=68983d11c1d7f3d00ef3d3656bf487c396c6f6ce;hpb=93448d16e72e38afbaecbccf6fdedd46d6a82a73;p=libs%2Fgl.git diff --git a/source/core/pipelinestate.h b/source/core/pipelinestate.h index 68983d11..42543e4d 100644 --- a/source/core/pipelinestate.h +++ b/source/core/pipelinestate.h @@ -4,6 +4,7 @@ #include #include #include "cullface.h" +#include "pipelinestate_backend.h" namespace Msp { namespace GL { @@ -19,8 +20,10 @@ class Texture; class UniformBlock; class VertexSetup; -class PipelineState: public NonCopyable +class PipelineState: public PipelineStateBackend { + friend PipelineStateBackend; + private: struct BoundTexture { @@ -72,14 +75,8 @@ private: const Blend *blend; mutable unsigned changes; - static const PipelineState *last_applied; - static std::vector bound_tex_targets; - static std::vector bound_uniform_blocks; - static unsigned restart_index; - public: PipelineState(); - ~PipelineState(); private: template @@ -104,12 +101,6 @@ public: const VertexSetup *get_vertex_setup() const { return vertex_setup; } FaceWinding get_front_face() const { return front_face; } CullMode get_face_cull() const { return face_cull; } - - void apply() const; -private: - void apply(unsigned) const; -public: - static void clear(); }; } // namespace GL