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/loader.h>
26 std::list<Shader *> shaders;
30 static Program *cur_prog;
33 class Loader: public DataFile::Loader
42 void vertex_shader(const std::string &);
43 void fragment_shader(const std::string &);
44 void attribute(uint, const std::string &);
45 virtual void finish();
49 Program(const std::string &, const std::string &);
55 void attach_shader(Shader &shader);
56 void detach_shader(Shader &shader);
57 const std::list<Shader *> &get_shaders() const { return shaders; }
58 void set_del_shaders(bool);
59 void bind_attribute(uint, const std::string &);
61 int get_param(GLenum param) const;
62 bool get_linked() const { return linked; }
63 std::string get_info_log() const;
65 int get_uniform_location(const std::string &) const;