X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogram.h;h=ad37fb65bfca60d51094e741732faf274da7e1ef;hb=76e338af116120d93d082ad247591ec9adad9233;hp=3b86a9c6d17d4af1af0ae0f1596eb67246799733;hpb=19583522999f9ca2cddb178691633bc20f714b01;p=libs%2Fgl.git diff --git a/source/program.h b/source/program.h index 3b86a9c6..ad37fb65 100644 --- a/source/program.h +++ b/source/program.h @@ -10,8 +10,8 @@ Distributed under the LGPL #include #include -#include #include +#include "gl.h" #include "types.h" namespace Msp { @@ -27,7 +27,7 @@ private: bool del_shaders; bool linked; - static Program *cur_prog; + static const Program *cur_prog; public: class Loader: public DataFile::Loader @@ -47,6 +47,9 @@ public: Program(); Program(const std::string &, const std::string &); +private: + void init(); +public: virtual ~Program(); void attach_shader(Shader &shader); @@ -58,7 +61,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();