1

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? ;)

0

2 Answers 2

4

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

Sign up to request clarification or add additional context in comments.

1 Comment

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.