Open RodrigoHamuy opened 2 months ago
When using the wireframe: true
flag, the engine internally creates special line geometry data and alters the render mode from triangles to lines.
This approach works for normal meshes but is incompatible with BatchedMesh
right now.
Since a new index buffer is created for the sake of drawing edges rather than triangles - the batched mesh "multi draw starts" and "multi draw counts" buffers (see here) need to be adjusted for the new primitive stride and buffer before upload.
Description
BatchedMesh
doesn't renderwireframe
mode correctly.Reproduction steps
BatchedMesh
with anyMaterial
withwireframe
set to true.Code
Live example
https://jsfiddle.net/hamuyrodrigo/w9vhs7rp/62/
Screenshots
Example: 2 spheres and 2 boxes.
With wireframe turned on.
With wireframe turned off.
Version
r167
Device
Desktop, Mobile
Browser
Chrome
OS
MacOS, Android