Base code for getting attributes in a GLSL shader