I have a problem with import of a 3D model into a WebGL shader program. In file.dae (Collada) I have lists of vertices and normals, and the count of elements in them are different. WebGL lacks clientSideArray, so I cannot use different indices for the active arrays (vertices, normals, textures)!
Is it possible to draw a model without re-transforming the data in the polygons (to use glDrawElements and not create arrays with identical numbers of elements)?
Perhaps there are some tricks with interleaved arrays?
No, WebGL (and OpenGL, and DirectX for that matter) requires that you have the same number of elements for each attribute. Even if it did, it would likely be more performance friendly to only deal with a single array of indices. Interleaved arrays don’t change that in any way, it’s just a more efficient way of storing the same data.