title: Getting OpenGL Shader variables into C++ without writing a custom parser
body: <p>I couldn't find anything about this so here goes: What I'm trying to do is make a generic game engine, I want to be able to load any 3D object and apply any shader to that model.</p>
  
  <p>I'm at the point where I need to know where the vertex attributes in the shader are so I can feed them to <code>glVertexAttribPointer</code>, However, <code>glVertexAttribPointer</code> takes as input the location of the attribute. 
  Different shaders could have different locations for the vertices. Is there a way to query the attributes in a shader and store them in a list in c++? </p>
  
  <p><em>Post Answer: I've found the following <a href="https://stackoverflow.com/questions/4635913/explicit-vs-automatic-attribute-location-binding-for-opengl-shaders/4638906#4638906">answer</a> that explains it in more detail.</em>  </p>