]> git.tdb.fi Git - libs/gl.git/blobdiff - source/program.cpp
Require mspgbase now that Image was moved there
[libs/gl.git] / source / program.cpp
index f057ea74aefbfe75d4aa447866d6a57a4cf05288..eed8b87a469a1ccf3f58cdb9f43a5fba1c10764d 100644 (file)
@@ -5,6 +5,7 @@ Copyright © 2007 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
+#include <algorithm>
 #include "arb_shader_objects.h"
 #include "arb_vertex_shader.h"
 #include "except.h"
@@ -182,11 +183,6 @@ Program::Loader::Loader(Program &p):
        add("attribute",       &Loader::attribute);
 }
 
-Program::Loader::~Loader()
-{
-       prog.link();
-}
-
 void Program::Loader::vertex_shader(const string &src)
 {
        prog.attach_shader(*new Shader(VERTEX_SHADER, src));
@@ -202,5 +198,10 @@ void Program::Loader::attribute(uint i, const string &n)
        prog.bind_attribute(i, n);
 }
 
+void Program::Loader::finish()
+{
+       prog.link();
+}
+
 } // namespace GL
 } // namespace Msp