5 #include <unordered_map>     8 #include <JSON/json.hpp>    13 using json = nlohmann::json;
    21   Program(
const json &program_obj);
    23   Program(istream &vertex, istream &fragment);
    25   Program(
const std::string& vpath, 
const std::string& fpath);
    29   void setVerbose(
bool v) { verbose = v; }
    30   bool isVerbose()
 const { 
return verbose; }
    32   GLuint getPID()
 const { 
return(pid); }
    34   bool wasBuildSuccessful() {
return(buildSuccess);}
    42   bool buildVsFsProgram(istream &vertex, istream &fragment);
    43   bool buildVsFsProgram(
const std::string& vertex, 
const std::string& fragment);
    67   bool buildFromJsonArray(
const json &program_obj);
    70   virtual void unbind();
    72   GLint getAttribute(
const string &name);
    73   GLint getUniform(
const string &name);
    74   bool hasAttribute(
const string &name);
    75   bool hasUniform(
const string &name);
    79   unordered_map<string,GLint> attributes;
    80   unordered_map<string,GLint> uniforms;
    82   bool buildSuccess = 
false;