X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogram.h;h=818e72be1174d4a0464bc91b5a691d8f54efd602;hb=927a1aa0a3a27e463ec0efc08bd08e7c4e969909;hp=3b86a9c6d17d4af1af0ae0f1596eb67246799733;hpb=19583522999f9ca2cddb178691633bc20f714b01;p=libs%2Fgl.git diff --git a/source/program.h b/source/program.h index 3b86a9c6..818e72be 100644 --- a/source/program.h +++ b/source/program.h @@ -10,8 +10,8 @@ Distributed under the LGPL #include #include -#include -#include +#include +#include "gl.h" #include "types.h" namespace Msp { @@ -27,14 +27,11 @@ private: bool del_shaders; bool linked; - static Program *cur_prog; + static const Program *cur_prog; public: - class Loader: public DataFile::Loader + class Loader: public DataFile::ObjectLoader { - private: - Program &prog; - public: Loader(Program &); @@ -47,6 +44,9 @@ public: Program(); Program(const std::string &, const std::string &); +private: + void init(); +public: virtual ~Program(); void attach_shader(Shader &shader); @@ -58,7 +58,7 @@ public: int get_param(GLenum param) const; bool get_linked() const { return linked; } std::string get_info_log() const; - void bind(); + void bind() const; int get_uniform_location(const std::string &) const; static void unbind();