]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/program.h
Add support for integer vertex attributes
[libs/gl.git] / source / core / program.h
index 090d8ed5ebc5c4d191ab24d13f7cef402502cdc3..f2d7d07672643edb8c83dd4a214bd45a7594be4b 100644 (file)
@@ -4,7 +4,6 @@
 #include <string>
 #include <vector>
 #include <msp/datafile/objectloader.h>
-#include "bindable.h"
 #include "datatype.h"
 #include "gl.h"
 #include "module.h"
@@ -20,7 +19,7 @@ class Shader;
 A complete shader program.  Programs can be assembled of individual Shaders or
 generated with a set of standard features.
 */
-class Program: public Bindable<Program>
+class Program
 {
 public:
        class Loader: public DataFile::CollectionObjectLoader<Program>
@@ -125,6 +124,7 @@ private:
        std::vector<UniformInfo> uniforms;
        LayoutHash uniform_layout_hash;
        std::vector<AttributeInfo> attributes;
+       std::string debug_name;
 
 public:
        /// Constructs an empty Program with no shader stages attached.
@@ -190,8 +190,11 @@ public:
        const AttributeInfo &get_attribute_info(const std::string &) const;
        int get_attribute_location(const std::string &) const;
 
-       void bind() const;
-       static void unbind();
+       unsigned get_id() const { return id; }
+
+       void set_debug_name(const std::string &);
+private:
+       void set_stage_debug_name(unsigned, Stage);
 };
 
 } // namespace GL