X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogram.h;h=b6007073bedd91c706f0d4a8c84706743f1ba904;hb=b85b8b599473a76e055008a2d45432d02848cb42;hp=4ff3f53a41c149a2e2d411d25cd52f4ae6873260;hpb=953f041e904e97c4435e0229b8d88eabe31e5c3d;p=libs%2Fgl.git diff --git a/source/program.h b/source/program.h index 4ff3f53a..b6007073 100644 --- a/source/program.h +++ b/source/program.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_GL_PROGRAM_H_ #define MSP_GL_PROGRAM_H_ @@ -50,17 +43,28 @@ public: bool specular; bool normalmap; bool shadow; + bool reflection; + bool transform; StandardFeatures(); std::string create_flags() const; }; + struct UniformInfo + { + std::string name; + int location; + int size; + GLenum type; + }; + private: unsigned id; std::list shaders; - bool del_shaders; + std::list owned_data; bool linked; + std::map uniforms; public: Program(); @@ -72,13 +76,13 @@ public: virtual ~Program(); void attach_shader(Shader &shader); + void attach_shader_owned(Shader *shader); void detach_shader(Shader &shader); void add_standard_shaders(const StandardFeatures &); private: static std::string process_standard_source(const char **, const std::string &); public: const std::list &get_shaders() const { return shaders; } - void set_del_shaders(bool); void bind_attribute(unsigned, const std::string &); void link(); bool is_linked() const { return linked; }