xeolabs/scenejs — pull request #322 by Oletus (2014-06-30 14:56:05+00:00)
Title: Refactor geometry chunks so that vertex arrays are set in a single type of chunk

Here is my proposal for refactoring the geometry chunks. geometry and morphGeometry chunks are merged into one, and drawElements calls go into their own draw chunks. This enables more elegant and better performing handling of VAOs. The geoChunkId hack is removed, and so are frameCtx.*Buf booleans.

The number of node cores per chunk can now be either one or two. A more generic solution that accepts an arbitrary number of cores per chunk could be developed, but it would likely perform worse because of more indirection and make the code for the most common case where there is only one core more complex.