]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/pipelinestate.h
Store default-block uniform data in a memory block
[libs/gl.git] / source / core / pipelinestate.h
index 9f6795f16ec176d0cb4204354dcd7b4b7a4ad53e..9573f9fede7eecc28a61bd7651728bb828c740cf 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef PIPELINESTATE_H_
-#define PIPELINESTATE_H_
+#ifndef MSP_GL_PIPELINESTATE_H_
+#define MSP_GL_PIPELINESTATE_H_
 
 #include <vector>
 #include <msp/core/noncopyable.h>
@@ -20,7 +20,6 @@ class StencilTest;
 class Texture;
 class UniformBlock;
 class VertexSetup;
-class WindingTest;
 
 class PipelineState: public NonCopyable
 {
@@ -77,6 +76,8 @@ private:
 
        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();
@@ -95,15 +96,12 @@ public:
        void set_face_cull(CullMode);
        void set_enabled_clip_planes(unsigned);
        void set_texture(unsigned, const Texture *, const Sampler *);
-       void set_uniforms(const DefaultUniformBlock *);
-       void set_uniform_block(unsigned, const BufferBackedUniformBlock *);
-private:
-       void set_uniform_block_(int, const UniformBlock *);
-public:
+       void set_uniform_block(int, const UniformBlock *);
        void set_depth_test(const DepthTest *);
        void set_stencil_test(const StencilTest *);
        void set_blend(const Blend *);
 
+       const Framebuffer *get_framebuffer() const { return framebuffer; }
        const Program *get_shader_program() const { return shprog; }
        const VertexSetup *get_vertex_setup() const { return vertex_setup; }
        FaceWinding get_front_face() const { return front_face; }