3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_PROGRAM_H_
9 #define MSP_GL_PROGRAM_H_
13 #include <msp/datafile/objectloader.h>
22 class Program: public Bindable<Program>
26 std::list<Shader *> shaders;
31 class Loader: public DataFile::ObjectLoader<Program>
37 void vertex_shader(const std::string &);
38 void fragment_shader(const std::string &);
39 void attribute(unsigned, const std::string &);
40 virtual void finish();
44 Program(const std::string &, const std::string &);
50 void attach_shader(Shader &shader);
51 void detach_shader(Shader &shader);
52 const std::list<Shader *> &get_shaders() const { return shaders; }
53 void set_del_shaders(bool);
54 void bind_attribute(unsigned, const std::string &);
56 int get_param(GLenum param) const;
57 bool get_linked() const { return linked; }
58 std::string get_info_log() const;
60 int get_uniform_location(const std::string &) const;