Let's say I have the following arrays (each of them with arbitrary lengths) and use them as spare-parts bins; put each of them in the buffer and then have openGL read the indices in the elements array and construct vertices by cherry-picking from each of the array bins.
We could construct one vertex by using
{coordinate v1, normal vn3, color c1, texCoord vt4}
Or we could construct another vertex using
{coordinate v1 again, normal vn3 again, color c3, texCoord vt2}
Note that "coordinates array" is not yet a vertex, it merely supplies a position to construct a vertex.
Is such thing going to be extremely difficult (for a beginner) in modern openGl using buffers and shaders?
CoordinatesArray:
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
NormalsArray:
vn 0.000000 0.000000 -1.000000
vn -1.000000 -0.000000 -0.000000
vn -0.000000 -0.000000 1.000000
vn -0.000001 0.000000 1.000000
vn 1.000000 -0.000000 0.000000
vn 1.000000 0.000000 0.000001
ColorsPallete:
c 1.0,1.0,1.0
c 0.0,1.0,0.0
c 0.2,0.3,0.2
TextureCoordArray:
vt 0.748573 0.750412
vt 0.749279 0.501284
vt 0.999110 0.501077
vt 0.999455 0.750380
vt 0.250471 0.500702
vt 0.249682 0.749677
vt 0.001085 0.750380
vt 0.001517 0.499994
vt 0.499422 0.500239
vt 0.500149 0.750166
vt 0.748355 0.998230
vt 0.500193 0.998728
vt 0.498993 0.250415
vt 0.748953 0.250920
IndexRecipiesArray:
f {1,2,1,4}, {2,2,1,4}, {3,2,1,4}
f {2,2,1,4}, {3,2,1,4}, {4,2,1,4}
f {4,5,1,4}, {5,2,1,4}, {6,2,1,4}
f {6,2,1,4}, {7,2,1,4}, {8,2,1,4}
f {1,2,1,4}, {1,2,1,4}, {1,2,1,4}