X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogram.h;h=d2032a5cd46843e36def08c91f8a95d699025bd1;hp=80ddf15ca33e282ff71a17cd79695db4fd324972;hb=HEAD;hpb=541bf02f18ad27e8c8101e4255586ddbfef40916 diff --git a/source/program.h b/source/program.h deleted file mode 100644 index 80ddf15c..00000000 --- a/source/program.h +++ /dev/null @@ -1,104 +0,0 @@ -/* $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_ - -#include -#include -#include -#include "bindable.h" -#include "gl.h" - -namespace Msp { -namespace GL { - -class Shader; - -class Program: public Bindable -{ -public: - class Loader: public DataFile::ObjectLoader - { - public: - Loader(Program &); - - private: - virtual void finish(); - - void attribute(unsigned, const std::string &); - void fragment_shader(const std::string &); - void standard(); - void vertex_shader(const std::string &); - }; - - struct StandardFeatures - { - class Loader: public DataFile::ObjectLoader - { - public: - Loader(StandardFeatures &); - }; - - bool texture; - bool material; - bool lighting; - bool specular; - bool normalmap; - bool shadow; - - 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; - bool linked; - std::map uniforms; - -public: - Program(); - Program(const StandardFeatures &); - Program(const std::string &, const std::string &); -private: - void init(); -public: - virtual ~Program(); - - void attach_shader(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; } - std::string get_info_log() const; - void bind() const; - int get_uniform_location(const std::string &) const; - - static void unbind(); -}; - -} // namespace GL -} // namespace Msp - -#endif