I work with OpenGL4.X .Recently I read this Apple OpenGLES2 doc where it is stated that using interleaved attribute arrays improves performance on IOS mobile devices and is the recommended way (instead of using blocks of attributes).
For those who didn't understand what I mean here is an example:
Block of attributes in a single attribute array:
float vertices[]{
//Triangle vertices:
v0x , v0y , v0z ,
v1x , v1y , v1z ,
v2x , v2y , v2z ,
//Triangle UVs:
uv0s , uv0t ,
uv1s , uv1t ,
uv2s , uv2t ,
//Triangle Normals:
n0x , n0y , n0z ,
n1x , n1y , n1z ,
n2x , n2y , n2z
}
Interleaved attribute array:
float vertices[]{
v0x , v0y , v0z ,
uv0s , uv0t , ////vertex 1 attributes
n0x , n0y , n0z ,
v1x , v1y , v1z ,
uv1s , uv1t , ///vertex 2 attributes
n1x , n1y , n1z ,
v2x , v2y , v2z ,
uv2s , uv2t , ///vertex 3 attributes
n2x , n2y , n2z
}
So my question is : Is it also true for OpenGL running on desktop GPUs ? If yes ,then how big the performance gain can theoretically be ?