speedy gonzalez
11-18-2003, 06:47 AM
My application keeps the vertex data as compressed as possible such that a given vertex might have more than one set of attributes (normals, colors, UVs).
For instance a corner of a cube will have 3 normals, one for each adjacent face, otherwise with one normal the shading will look awfull.
In general an object will have say 10% of the vertices having discontinuities of either the normal, the color or the UVs.
I would love to use vertex arrays but given the single-index nature of vertex arrays I doubt I could use them.
I was wondering if anyone out there found a way to still use vertex arrays even for those cases ?
I know one of the solution is to split the vertex in N vertices for those cases but this will be a nightmare of maintenance in my case.
For instance a corner of a cube will have 3 normals, one for each adjacent face, otherwise with one normal the shading will look awfull.
In general an object will have say 10% of the vertices having discontinuities of either the normal, the color or the UVs.
I would love to use vertex arrays but given the single-index nature of vertex arrays I doubt I could use them.
I was wondering if anyone out there found a way to still use vertex arrays even for those cases ?
I know one of the solution is to split the vertex in N vertices for those cases but this will be a nightmare of maintenance in my case.