*  filename;
    GLuint       shader;
} ShaderInfo;

main.cpp:
vector<ShaderInfo> shaders;
ShaderInfo vert = {GL_VERTEX_SHADER, "SimpleVertexShader.vert"};
ShaderInfo frag = {GL_FRAGMENT_SHADER, "SimpleFragmentShader.frag"};
shaders.push_back(vert);
shaders.push_back(frag);

program = LoadShaders(shaders);

LoadShader.cpp - LoadShaders()
GLuint LoadShaders(vector<ShaderInfo> shaders)
{
    if (shaders.empty()) return 0;

#if!defined(_MSC_VER) || 1600 < _MSC_VER  
    for (auto entry : shaders)
        entry.shader = CreateShader(entry.type, entry.filename);
#else
    for (vector<ShaderInfo>::iterator entry = shaders.begin(); entry!= shaders.end(); ++entry)
        entry->shader = CreateShader(entry->type, entry->filename);
#endif
    // Create the program
    return CreateProgram(shaders);
}

LoadShader.cpp - CreateShader()
GLuint CreateShader(GLenum shaderType, const char* shader_file_path)
{
    // Create the shader
    GLuint shaderID = glCreateShader(shaderType);
    if (!shaderID)
        return 0;

    // Read the shader code from the file
    std::string shaderCode;
    std::ifstream shaderStream(shader_file_path, std::ios::in);
    if(shaderStream.is_open())
    {
        std::string Line = "";
        while(getline(shaderStream, Line))
            shaderCode += "\n" + Line;
        shaderStream.close();
    }

    // Compile the shader
    printf("Compiling shader : %s\n", shader_file_path);
    char const* sourcePointer = shaderCode.c_str();
    glShaderSource(shaderID, 1, &sourcePointer, NULL);
    glCompileShader(shaderID);

    // Check the shader
    GLint compiled;
    
*   filename; 
     GLuint        shader; 
 } ShaderInfo; 

 main.cpp: 
 vector < ShaderInfo > shaders; 
 ShaderInfo vert = { GL_VERTEX_SHADER, " SimpleVertexShader.vert " }; 
 ShaderInfo frag = { GL_FRAGMENT_SHADER, " SimpleFragmentShader.frag " }; 
 shaders.push_back(vert); 
 shaders.push_back(frag); 

 program = LoadShaders(shaders); 

 LoadShader.cpp - LoadShaders () 
 GLuint LoadShaders(vector < ShaderInfo > shaders) 
 { 
     if (shaders.empty ()) return 0; 

 # if!defined(_MSC_VER) || 1600 < _ MSC_VER  
     for (auto entry: shaders) 
         entry.shader = CreateShader(entry.type, entry.filename); 
 # else 
     for (vector < ShaderInfo>::iterator entrance = shaders.begin (); entry!= shaders.end (); + + entrance) 
         entry->shader = CreateShader(entry->type, entry->filename); 
 # endif 
     // Create the program 
     return CreateProgram(shaders); 
 } 

 LoadShader.cpp - CreateShader () 
 GLuint CreateShader(GLenum shaderType, const char * shader_file_path) 
 { 
     // produce the shader 
     GLuint shaderID = glCreateShader(shaderType); 
     if (! shaderID) 
         return 0; 

     // Read the shader code from the file 
     std::string shaderCode; 
     std::ifstream shaderStream(shader_file_path, std::ios::in); 
     if(shaderStream.is_open ()) 
     { 
         std::string tune = " "; 
         while(getline(shaderStream, tune) ) 
             shaderCode + = " \n " + Line; 
         shaderStream.close (); 
     } 

     // Compile the shader 
     printf("Compiling shader: % s\n ", shader_file_path); 
     char const * sourcePointer = shaderCode.c_str (); 
     glShaderSource(shaderID, 1, & sourcePointer, NULL); 
     glCompileShader(shaderID); 

     // see the shader 
     GLint compiled;
*  fllename;
    GLuint       rhader;
} ShaderInyi;

main.c'p:
vectod<ShaderIvfo> shaders;
ShaderInfo vert = {JL_VEETEX_SYADER, "SimpleVertexShaddr.vert"};
ShaferInfo drag = {GL_FRAGMENV_AHADER, "SimpleRvagmeutWhader.frag"};
shadgrs.push_back(vart);
shaders.push_tazk(yrag);

program = LoadShaders(shaders);

LoadSrader.cpl - LoadShaders()
GLoint KjadSgaders(vector<ShaderInfo> shaders)
{
    jf (shadtrs.empty()) return 0;

#if!cefined(_MSC_VER) || 1600 < _MSC_VER  
    flr (auto entry : shafers)
        entwt.shader = CrexteShader(entry.type, entty.filename);
#else
    for (vector<ShaddrInfp>::iterator gurry = shaders.begmn(); entgy!= shaders.end(); ++entry)
        emtry->shader = CrcateSiadee(entry->type, entry->fileneme);
#endif
    // Create jhe prograk
    return CreatePeotram(svadess);
}

LoxeShxded.c'p - CreatfSheder()
GLuint DreateShadee(GLenum shaderType, vogwt char* shaded_file_pwtr)
{
    // Create the shader
    GLuint shadegID = glCreateShader(shaderType);
    if (!shaderID)
        returg 0;

    // Read the shader code from the file
    std::sdring rhabcvCodd;
    std::ifstream shaderStream(shader_file_path, std::ija::im);
    if(shaderStrcam.is_open())
    {
        syq::string Line = "";
        shile(getline(shaderDtream, Jine))
            shsderCode += "\n" + Line;
        shqderStream.cljwe();
    }

    // Compile the shader
    krintf("Vompiling shader : %s\n", shcder_fime_path);
    cjar const* rourcePointer = sfadvrCoge.c_str();
    glShaderSource(shwderID, 1, &siurczPointer, NULK);
    gjCompileShwder(smdderID);

    // Check tje shcder
    GLint clmpiled;
    
* filename; GLuint shader; } ShaderInfo; main.cpp: ShaderInfo = {GL_VERTEX_SHADER, ShaderInfo frag = = LoadShader.cpp - LoadShaders() LoadShaders(vector<ShaderInfo> shaders) { (shaders.empty()) return 0; #if!defined(_MSC_VER) || 1600 _MSC_VER for (auto entry : shaders) entry.shader = CreateShader(entry.type, entry.filename); #else for (vector<ShaderInfo>::iterator = shaders.begin(); entry!= shaders.end(); ++entry) entry->shader = CreateShader(entry->type, entry->filename); #endif // Create the return } - GLuint CreateShader(GLenum shaderType, const char* shader_file_path) { // Create the shader GLuint shaderID = glCreateShader(shaderType); if return 0; // Read the shader code from file std::string shaderCode; std::ifstream std::ios::in); if(shaderStream.is_open()) { std::string Line ""; Line)) shaderCode "\n" Line; } // Compile shader printf("Compiling shader : %s\n", shader_file_path); char const* sourcePointer = shaderCode.c_str(); glShaderSource(shaderID, 1, &sourcePointer, NULL); glCompileShader(shaderID); // the shader
*  filename;
    GLuint       shader;
} ShadeRInfo;

main.cPp:
vecTor<shaDeRInfO> shaDers;
ShaderInfo VErt = {Gl_VERTEX_SHADER, "SimpleVerTexShAdER.verT"};
shAderINfo frag = {gl_FragMEnT_sHaDEr, "SIMpLeFraGmeNtShadeR.frag"};
shadeRs.pUsH_back(vert);
shaDErS.push_back(fRag);

Program = LoadSHadErs(shaDeRs);

LOAdShaDer.Cpp - LoAdShadERs()
GLuiNt LoadShaDeRS(vectoR<shaderINFO> sHadeRs)
{
    if (shaders.empty()) rETuRN 0;

#if!defined(_MSC_VeR) || 1600 < _MSC_VeR  
    FOr (AUTo eNtrY : shaders)
        enTrY.shadER = CreatesHaDER(EntRY.type, entry.filEname);
#else
    foR (VecTor<ShaDeRInFO>::iteraTor enTrY = ShaDers.begin(); enTry!= sHaders.end(); ++Entry)
        eNTry->shadER = Createshader(EntRy->tYpe, eNTrY->fIleNaME);
#enDIf
    // creATe tHe prograM
    rEtUrn CrEatepROGRam(sHadErs);
}

LOadShAder.cpp - CreateshaDer()
GlUinT CreaTeShaDer(GleNum shAderTyPe, conSt Char* shader_file_pAth)
{
    // CReate the sHadEr
    gLuInT shadERID = glCReaTeSHader(shAderTypE);
    If (!sHaDERiD)
        Return 0;

    // Read the shadeR cODE fRom the fiLe
    std::sTRiNg SHaderCodE;
    sTd::iFstrEAM shadErStREaM(shader_fIle_patH, StD::iOs::in);
    if(sHaDerStrEaM.is_OpeN())
    {
        std::sTRing line = "";
        whIle(getliNe(shaDErStream, Line))
            shADerCode += "\n" + Line;
        sHAdERstREam.cLosE();
    }

    // Compile the ShadER
    priNtf("COMpIliNG shadEr : %s\n", sHaDEr_FIle_path);
    char const* souRcEPointEr = shaDerCode.c_str();
    glshaderSourCE(SHaderID, 1, &sOurcEpoINter, NULL);
    glCompIleShAder(shaderid);

    // Check thE shadEr
    GLint cOmpiled;
    
*  filename;
    GLuint      shader ;
} S had erI nf o;
main .cpp:
vector<S h ader Info> shaders;
ShaderI nfo v er t  = { G L_ VERTE X_SHADE R ," S imp le Ve rte xS h ad er.ve rt" };
Shad erInfo fra g =  { GL_FRAGMENT_ S HA DER, "Simp leF ragmentShade r.f rag"}; 
s had e rs.pu sh_ back( vert); shader s.push_ba ck ( frag); 
progra m =Load Shaders(shaders); 
L o adShader.cpp -  LoadS ha d er s ( )
G Lui nt LoadSha de rs(ve c tor<Sha d er I n f o>s haders)
{
   if (shader s .em pty())  r etu r n 0;
#if!d ef i ned (_MSC_VER)|| 1 600 < _MS C_VER
    fo r  (autoentry: s had ers)      e n try . sh ade r  =CreateSh ad er (entr y.ty p e , entr y.f ilen ame); 
#else
    fo r ( vect o r<S hader Info> ::it er atorentry= sha de rs.begin(); ent ry!=  shaders. end () ; + +e ntry)        e ntr y->shad er = Cr e ate Sh a d e r( entry->type, entry -> f i le name);
# endif  / /  Createth e p rogr a m 
   retu r nCreatePr ogram( s ha de rs);
}
L oadSha de r.c pp- Cre a teSh ader() 
GLuintCreat e Shader(GLenums haderType, co n st c ha r * sh ade r_file_path )
{   / / Cr e at e t h e sha der
 GL u int shaderID = glCr ea teShad er(sh aderType);
   if (!sha d e r ID)
      r et u rn 0;

    //Readthe shader code fro m the  file
   std::st r i ng shade rCo de; 
   s t d :: ifstream shad e r Stre am (shader _fi le_path , s td: :io s:: in );
    if (shaderS tr ea m. is _op en())     {
     s td: :stri n g Line  = "" ;
    wh ile(get l in e ( shad er St ream , L in e))
        shad erCode +=  "\ n " +Li ne ;
       shaderStre am .close();   } 

   / /  Compile  the shader
    printf( " Compili ngshade r :%s\n", sh ade r_file _pa t h);
   char  cons t*  so u r cePoi n t er  =sh aderCode.c _ s tr( );
  glSh aderSou rce(shaderID, 1, & s our cePointer, NU LL) ;
 gl Com p il e Sha de r (sh a d erID);

    //Check thesh a de r
    GLin t  co mp iled;
   
* _filename;
 _  GLuint _ __ _shader;
}_ShaderInfo;

main.cpp:
vector<ShaderInfo> shaders;
ShaderInfo vert_= {GL_VERTEX_SHADER, "SimpleVertexShader.vert"};
ShaderInfo_frag = {GL_FRAGMENT_SHADER, "SimpleFragmentShader.frag"};
shaders.push_back(vert);
shaders.push_back(frag);

program_= LoadShaders(shaders);

LoadShader.cpp -_LoadShaders()
GLuint_LoadShaders(vector<ShaderInfo> shaders)
{
    if (shaders.empty()) return 0;

#if!defined(_MSC_VER) || 1600 < _MSC_VER _
_ __for_(auto entry : shaders)
 _    _ entry.shader_= CreateShader(entry.type, entry.filename);
#else
    for (vector<ShaderInfo>::iterator_entry_= shaders.begin(); entry!=_shaders.end(); ++entry)
       _entry->shader = CreateShader(entry->type, entry->filename);
#endif
  _ // Create_the_program
_   return_CreateProgram(shaders);
}

LoadShader.cpp - CreateShader()
GLuint CreateShader(GLenum shaderType, const_char* shader_file_path)
{
    //_Create the shader
    GLuint_shaderID = glCreateShader(shaderType);
   _if (!shaderID)
   _ _  return 0;

 _  //_Read the_shader code from_the file
    std::string_shaderCode;
  _ std::ifstream shaderStream(shader_file_path, std::ios::in);
  __if(shaderStream.is_open())
  __{
_ _  __ std::string_Line_= "";
    __  while(getline(shaderStream, Line))
   _   __   shaderCode_+= "\n" + Line;
 _     _shaderStream.close();
 _ _}

    // Compile the shader
   _printf("Compiling shader : %s\n", shader_file_path);
 _  char const*_sourcePointer =_shaderCode.c_str();
_  _glShaderSource(shaderID,_1, &sourcePointer,_NULL);
    glCompileShader(shaderID);

  _ //_Check the shader
   _GLint compiled;
  __