]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/program.h
Split Module into a base class and format-specific class
[libs/gl.git] / source / core / program.h
index 052236270d4b54b3d0ca2b29ebecc908f8f82ea5..9fa757479eacf11d09ca7880bbab83daeb74c6db 100644 (file)
@@ -11,6 +11,7 @@
 namespace Msp {
 namespace GL {
 
+class GlslModule;
 class Module;
 class Shader;
 
@@ -92,7 +93,7 @@ public:
 
 private:
        unsigned id;
-       std::vector<unsigned> shader_ids;
+       std::vector<unsigned> stage_ids;
        const Module *module;
        bool linked;
        UniformBlockMap uniform_blocks;
@@ -119,14 +120,19 @@ public:
        virtual ~Program();
 
        void add_stages(const Module &, const std::map<std::string, int> & = std::map<std::string, int>());
+private:
+       unsigned add_stage(GLenum);
+       void add_glsl_stages(const GlslModule &, const std::map<std::string, int> &);
+       void compile_glsl_stage(unsigned);
 
+public:
        DEPRECATED void attach_shader(Shader &shader);
        DEPRECATED void attach_shader_owned(Shader *shader);
        DEPRECATED void detach_shader(Shader &shader);
        DEPRECATED const std::vector<Shader *> &get_attached_shaders() const;
 
        DEPRECATED void bind_attribute(unsigned, const std::string &);
-       DEPRECATED void bind_attribute(VertexComponent, const std::string &);
+       DEPRECATED void bind_attribute(VertexAttribute, const std::string &);
        DEPRECATED void bind_fragment_data(unsigned, const std::string &);
 
        void link();