glVertexAttribPointer - understanding the size attribute
Members - Reputation: 102
Posted 18 November 2012 - 04:28 AM
after reading several OpenGL documentations I understand that glVertexAttribPointer takes a numeral value between 1 and 4 for its second parameter (size) as information how many vertices are taken into consideration to render a single triangle. But I do not understand how to use other then three vertices for a triangle. Also trying different values and seeing the result doesn't help me.
What exactly does this do and what is it used for?
Moderators - Reputation: 40220
Posted 18 November 2012 - 05:54 AM
e.g. if size is 3, and type is GL_FLOAT, then the corresponding C/C++ type is float and the GLSL type is vec3.
Crossbones+ - Reputation: 6628
Posted 18 November 2012 - 01:18 PM
You can additional information besides the position of a vertex.
Edited by TheChubu, 18 November 2012 - 01:23 PM.
"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"