Rendering to png
Opened this issue · 1 comments
ochafik commented
I just had a use case for rendering previews to PNG and realized the WASM build doesn't seem to support this.
@DSchroer @t-paul Do you guys know if it would be possible to build for WASM w/ offscreen OpenGL support? (e.g. maybe enabling OFFSCREEN_FRAMEBUFFER or something?).
(as a workaround we had to wrap the native binary in a server API forking out to xvfb -a openscad - -o out.png
)
t-paul commented
xvfb
is not needed anymore when built against GLAD / EGL, that can get an OpenGL context on a headless system.
I think the WASM fails because there simply is no OpenCSG. I'm not sure if OpenCSG will build on WASM and if so, if we can get a compatible Context.