When setting up attribute locations for an OpenGL shader program, you are faced with two options:
glBindAttribLocation() before linking to explici
The third option, ie layout(location=0) in vec4 position; in the shader code, is now available in OpenGL ES 3.0/GLSL 300 es. Only for vertex shader input variables though.
layout(location=0) in vec4 position;