]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/programdata.h
Set OpenGL debug labels on various objects loaded from Resources
[libs/gl.git] / source / render / programdata.h
index f600f02585c3d13fcd5cdd57ba0004da30c2e04b..a05674dd21927304d3755aa5f0118870ef81729e 100644 (file)
@@ -152,11 +152,13 @@ private:
        // XXX All these mutables are a bit silly, but I'm out of better ideas
        const Program *tied_program;
        std::vector<TaggedUniform> uniforms;
+       unsigned generation;
        mutable std::vector<SharedBlock> blocks;
        mutable std::vector<ProgramBlock> programs;
        mutable BufferBackedUniformBlock *last_buffer_block;
        mutable Buffer *buffer;
        mutable Mask dirty;
+       std::string debug_name;
 
 public:
        ProgramData(const Program * = 0);
@@ -173,6 +175,7 @@ private:
        void uniform_array(Tag, unsigned, V);
        bool validate_tag(Tag) const;
        void add_uniform(Tag, Uniform *);
+       void mark_dirty(Mask);
 public:
        void uniform(Tag, const Uniform &);
        void uniform(Tag, int);
@@ -234,6 +237,8 @@ public:
 
        void remove_uniform(Tag);
 
+       unsigned get_generation() const { return generation; }
+
        std::vector<Tag> get_uniform_tags() const;
        const Uniform &get_uniform(Tag) const;
        const Uniform *find_uniform(Tag) const;
@@ -248,6 +253,8 @@ public:
        /** Applies uniform blocks for the currently bound program, creating them
        if needed. */
        void apply() const;
+
+       void set_debug_name(const std::string &);
 };
 
 template<typename T, unsigned N>