// -*- c++ -*- // load and update shader #ifndef SHADER_H #define SHADER_H // Apple's annoying non-standard GL include location #if defined(__APPLE__) || defined(MACOSX) #include #include #else #include #include #endif #include #include // info on a vertex or fragment shader class ShaderInfo { public: enum ShaderType {VERTEX, FRAGMENT, NUM_SHADER_TYPES}; private: ShaderType type; std::string name; struct stat time; public: GLhandleARB glsl; public: ShaderInfo(ShaderType t); void setName(std::string n); void updateShader(); }; extern ShaderInfo vertInfo, fragInfo; // update both vertex and fragment shader extern "C" void updateShaders(); #endif