Vertex shader inputs
A vertex shader can have only two different kinds of inputs: vertex attributes and uniform variables.
Vertex attributes
A vertex attribute is simply the information you pass to the shader, in a per-vertex basis, along the plain vertex position in the world. Examples of vertex attributes could be:
Texture coordinates
Normals
Tangents
Per-vertex colors
Because of the evolving nature of OpenGL, version after version, details tend to be generalized. OpenGL specification writers try to define the data as uniform as possible. In the early programmable shader's days, there were specific attributes with specific names for texture coordinates, normals, vertex colors, and so on. Now, all attributes are generic and have no special names. They are simply vertex attribute buffers.
In order to show how attributes are bound to the vertex shader, we need to see how to set them up in the OpenGL host application.
First, we have to create and fill a vertex array configured with vertices and texture...