OpenJSCAD.org
OpenJSCAD.org copied to clipboard
Improve regl-renderer to better reuse same geometry with different location or color
Expected Behavior
Fast change of colors on colorcube example at jscad
Actual Behavior
slower than expected
Steps to Reproduce the Problem
- load https://openjscad.xyz/?uri=https://openjscad.xyz/examples/core/colors/colorCube.js
- change parameters
- wait for update on screen
Specifications
The colorcube example will also likely benefit from #805
- Version: V2
- Platform: all
- Environment: all
The concept that can provide this is instancing and is only available in wegl2.
To implement at some point in regl-rendere maybe
- new draw command is needed
- code that groups geometries
- a fallback to current method of drawing them when webgl2 is not supported
It may have too many obstacles in regl to implement, so it would have to be considered carefully before committing to do it.