]> git.tdb.fi Git - libs/gl.git/blobdiff - source/program.h
Entirely new system for building standard shaders
[libs/gl.git] / source / program.h
index 21b38c255e7262d77d01800c2204d27c75c7f0f8..8cdfb6de44e561910b0f4e446d0d0095bab76b89 100644 (file)
@@ -6,6 +6,7 @@
 #include <msp/datafile/objectloader.h>
 #include "bindable.h"
 #include "gl.h"
+#include "programbuilder.h"
 
 namespace Msp {
 namespace GL {
@@ -29,28 +30,6 @@ public:
                void vertex_shader(const std::string &);
        };
 
-       struct StandardFeatures
-       {
-               class Loader: public DataFile::ObjectLoader<StandardFeatures>
-               {
-               public:
-                       Loader(StandardFeatures &);
-               };
-
-               bool texture;
-               bool material;
-               bool lighting;
-               bool specular;
-               bool normalmap;
-               bool shadow;
-               bool reflection;
-               bool transform;
-
-               StandardFeatures();
-
-               std::string create_flags() const;
-       };
-
        struct UniformBlockInfo;
 
        struct UniformInfo
@@ -88,7 +67,7 @@ private:
 
 public:
        Program();
-       Program(const StandardFeatures &);
+       Program(const ProgramBuilder::StandardFeatures &);
        Program(const std::string &, const std::string &);
 private:
        void init();
@@ -98,10 +77,6 @@ public:
        void attach_shader(Shader &shader);
        void attach_shader_owned(Shader *shader);
        void detach_shader(Shader &shader);
-       void add_standard_shaders(const StandardFeatures &);
-private:
-       static std::string process_standard_source(const char **, const std::string &);
-public:
        const ShaderList &get_shaders() const { return shaders; }
 
        void bind_attribute(unsigned, const std::string &);