#include <msp/datafile/objectloader.h>
#include "bindable.h"
#include "gl.h"
+#include "programbuilder.h"
namespace Msp {
namespace GL {
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
public:
Program();
- Program(const StandardFeatures &);
+ Program(const ProgramBuilder::StandardFeatures &);
Program(const std::string &, const std::string &);
private:
void init();
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 &);
void link();
private:
static unsigned compute_layout_hash(const std::vector<const UniformInfo *> &);
+ static bool uniform_location_compare(const UniformInfo *, const UniformInfo *);
public:
bool is_linked() const { return linked; }
std::string get_info_log() const;