#include <vector>
#include <msp/core/noncopyable.h>
#include "cullface.h"
+#include "pipelinestate_backend.h"
namespace Msp {
namespace GL {
class UniformBlock;
class VertexSetup;
-class PipelineState: public NonCopyable
+class PipelineState: public PipelineStateBackend
{
+ friend PipelineStateBackend;
+
private:
struct BoundTexture
{
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>
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