rendajs / Renda

A modern rendering engine for the web.
https://rendajs.org
MIT License
10 stars 4 forks source link

Support for meshes without index buffers #858

Open jespertheend opened 8 months ago

jespertheend commented 8 months ago

Right now the Mesh constructor always creates an empty index buffer, and there is no way to to create a mesh without an index buffer. I think it should be null by default, and only when setting index data should it be created. Similarly, setIndexData should probably take null as a value, causing the index buffer to be removed.

Also the WebGPU renderer doesn't really handle this case well.