00001 #ifndef SHADER_PRIMITIVE_H 00002 #define SHADER_PRIMITIVE_H 00003 00004 #include <fstream> 00005 #include <string> 00006 00007 #include <GL/glew.h> 00008 00009 #include "primitive.h" 00010 #include "screen.h" 00011 #include "color.h" 00012 00013 using namespace std; 00014 00015 namespace glot { 00016 00028 class shader_primitive : public primitive { 00029 00030 public: 00031 00034 shader_primitive() : primitive(), f(0), g(0), v(0) {}; 00035 00039 shader_primitive(const color& col) : primitive(col) {}; 00040 00045 virtual ~shader_primitive() {}; 00046 00060 void printProgramInfoLog(GLuint obj); 00061 00073 void printShaderInfoLog(GLuint obj); 00074 00082 string read_file(const char * filename); 00083 00084 protected: 00085 00092 GLhandleARB f; 00093 GLhandleARB g; 00094 GLhandleARB v; 00095 00096 private: 00097 00098 }; 00099 00100 } 00101 00102 #endif