Added BufferGeometry for direct rendering from typed arrays.
Work in progress. For the moment works just with CTMLoader. Still not sure where some pieces of code would go. Upsides: - initialization time cut down significantly (1.8 seconds => 0.7 seconds for CTM example) - much smaller GL buffers thanks to fully used indexing (Walt has 6x less vertices) - consequently much smaller memory footprint all around, both for main and GPU memories, which means less swapping and better vertex caching Downsides: - can't have anymore sharp per-face effects like flat shading (at least if mesh is not constructed in a way where each face has own vertices) - can't have multiple materials per mesh - no more easy manipulation of anything (for the moment actually no runtime manipulation at all, typed arrays are just thrown away, dynamic geometries code path not yet implemented)
Showing
因为 它太大了无法显示 source diff 。你可以改为 查看blob。
src/extras/core/BufferGeometry.js
0 → 100644
想要评论请 注册 或 登录