X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogram.h;h=8cdfb6de44e561910b0f4e446d0d0095bab76b89;hb=ae9abd6be3e556d0a202cc5ab05668da715382c9;hp=132c21d5b126ec7d1dc3d2d9bb94ec1814747fb0;hpb=3f7b09b2e12830eb439889b300f0d6591c4952ac;p=libs%2Fgl.git diff --git a/source/program.h b/source/program.h index 132c21d5..8cdfb6de 100644 --- a/source/program.h +++ b/source/program.h @@ -6,6 +6,7 @@ #include #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 - { - 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 &); @@ -109,6 +84,7 @@ public: void link(); private: static unsigned compute_layout_hash(const std::vector &); + static bool uniform_location_compare(const UniformInfo *, const UniformInfo *); public: bool is_linked() const { return linked; } std::string get_info_log() const;