Made VBOs reusable.
The most tangible practical effect is that demos with multiple Lucys / Walts are now initialized much faster ;). Reuse is achieved mostly by moving mesh chunks / VBOs (formerly called materialFaceGroups) from Mesh into Geometry. This means sorting of geometry by face materials + breaking large geometries into chunks now has to be done after construction of geometry. It becomes a step in the usual sequence: geometry.computeNormals(); geometry.computeCentroids(); geometry.sortFacesByMaterial(); If geometry is constructed programmatically (e.g. with GeometryUtils.merge), this has to be called afterwards. Also of note: single geometry cannot be reused both for flat and smooth shading, as only one stream of normals is baked into VBO.
Showing
此差异已折叠。
此差异已折叠。
此差异已折叠。
想要评论请 注册 或 登录