X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fprogram.cpp;h=ed2455f86aa315ec79f97bf2860563f7d40cc243;hb=e92de029768eef5f0fd744329e589161b46d0762;hp=33c53cd7755fe4f0e4d7b1bd293c2f6af30c8748;hpb=fcde8390ad577fe434dcd4b29e0f410d29f867c9;p=libs%2Fgl.git diff --git a/source/core/program.cpp b/source/core/program.cpp index 33c53cd7..ed2455f8 100644 --- a/source/core/program.cpp +++ b/source/core/program.cpp @@ -355,7 +355,8 @@ void Program::link() } } - Conditional _bind(!ARB_separate_shader_objects, this); + if(!ARB_separate_shader_objects) + glUseProgram(id); for(map::const_iterator i=transient->textures.begin(); i!=transient->textures.end(); ++i) { int location = get_uniform_location(i->first); @@ -754,25 +755,6 @@ int Program::get_attribute_location(const string &name) const return i!=attributes.end() && i->name==name ? i->location : -1; } -void Program::bind() const -{ - if(!linked) - throw invalid_operation("Program::bind"); - - if(!set_current(this)) - return; - - glUseProgram(id); -} - -void Program::unbind() -{ - if(!set_current(0)) - return; - - glUseProgram(0); -} - void Program::set_debug_name(const string &name) { #ifdef DEBUG