]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/pipelinestate.h
Move all OpenGL-specific code to a separate directory
[libs/gl.git] / source / core / pipelinestate.h
index 68983d11c1d7f3d00ef3d3656bf487c396c6f6ce..42543e4dc2596f5de2e2c0a7c71e85f9b64fa4c8 100644 (file)
@@ -4,6 +4,7 @@
 #include <vector>
 #include <msp/core/noncopyable.h>
 #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<int> bound_tex_targets;
-       static std::vector<char> bound_uniform_blocks;
-       static unsigned restart_index;
-
 public:
        PipelineState();
-       ~PipelineState();
 
 private:
        template<typename T>
@@ -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