Reputation: 122
I am going through the OpenGL tutorials on learnopengl.com and feel I have a pretty solid grasp of what I have learned thus far. The only thing that I am having trouble with, is the indices in GLSL. All I know so far is that they are for transferring data between shaders, and between buffers and the vertex shader. I would like to understand the following:
Thank you for taking the time to help me out!
Upvotes: 0
Views: 268
Reputation: 106
Vertex data is stored (or rather buffered - the CPU may process it but it all gets sent to the GPU) in the GPU memory. Here's a picture:
16 is the minimum number of attributes that OpenGL will guarantee. As mentioned in the tutorial (in the beginning of the shaders section) and in the OpenGL documentation, the number of vertex attributes is limited by the graphics hardware. Each additional vertex attribute means one more thing for your GPU to process per vertex. Disabling all the vertex attributes by default and requiring the programmer to enable the attributes he/she needs allows your code to run efficiently.
Upvotes: 2