Question

For performance reasons, I would like to migrate to BufferGeometry instead of Geometry. It works great for Mesh and ParticleSystem objects, but when setting the geometry of a Line to a BufferGeometry, initLineBuffer() expects a geometry.vertices Vector3 array which a BufferGeometry does not have.

The call stack: render --> initWebGLObjects --> addObject --> initLineBuffers

Is there a simple solution for this, or do I need to hack? ;)

Was it helpful?

Solution 2

It looks like right now BufferGeometry will only draw out to triangles, so you you cannot have it draw lines (unless you do something like make the two of the three triangle vertices the same, but that is pretty hacky). It supports meshes and particles, so maybe soon it will support lines. Here is the line in the source

OTHER TIPS

BufferGeometry does support lines now. Look at webgl_buffergeometry_lines.html example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top