]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/programdata.h
Multiplex streaming buffer contents on Vulkan
[libs/gl.git] / source / render / programdata.h
index 53f48a6be5cefe14f5a316a78177daff6de54d4b..5d674a38a2504f8360d338f5ac74b85f3545689e 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_PROGRAMDATA_H_
 
 #include <stdexcept>
+#include <msp/core/noncopyable.h>
 #include <msp/datafile/objectloader.h>
 #include "datatype.h"
 #include "matrix.h"
@@ -35,7 +36,7 @@ programs have the same layout, the same block is used for them.
 The class is optimized for an access pattern where the set of uniforms and
 programs stays constants, with only the values changing.
 */
-class ProgramData
+class ProgramData: public NonCopyable
 {
 public:
        class Loader: public DataFile::ObjectLoader<ProgramData>
@@ -162,9 +163,6 @@ private:
 
 public:
        ProgramData(const Program * = 0);
-       ProgramData(const ProgramData &);
-       ProgramData(const ProgramData &, const Program *);
-       ProgramData &operator=(const ProgramData &);
        ProgramData(ProgramData &&);
        ~ProgramData();
 
@@ -248,6 +246,7 @@ public:
 
        std::vector<Tag> get_uniform_tags() const;
        void copy_uniform(const ProgramData &, Tag);
+       void copy_uniforms(const ProgramData &);
 
 private:
        int find_uniform_index(Tag) const;
@@ -259,7 +258,7 @@ private:
 public:
        /** Creates or updates UniformBlocks for a specific program if necessary,
        then sets them to the PipelineState. */
-       void apply(const Program &, PipelineState &) const;
+       void apply(const Program &, PipelineState &, unsigned) const;
 
        void set_debug_name(const std::string &);
 };