return log;
}
-void Program::bind() const
-{
- if(!linked)
- throw invalid_operation("Program::bind");
-
- if(!set_current(this))
- return;
-
- glUseProgramObjectARB(id);
-}
-
int Program::get_uniform_location(const string &n) const
{
UniformMap::const_iterator i = uniforms.find(n);
return i->second.location;
}
+void Program::bind() const
+{
+ if(!linked)
+ throw invalid_operation("Program::bind");
+
+ if(!set_current(this))
+ return;
+
+ glUseProgramObjectARB(id);
+}
+
void Program::unbind()
{
if(!set_current(0))
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();
bool is_linked() const { return linked; }
std::string get_info_log() const;
- void bind() const;
+
unsigned get_uniform_layout_hash() const { return uniform_layout_hash; }
int get_uniform_location(const std::string &) const;
+ void bind() const;
static void unbind();
};