Re: Thoughts on an OpenGL WebAssembly implementation

Emscripten (wasm's toolchain) already provides emulation of classic OpenGL
(by way of redirection through WebGL), as well as various modes to attempt
to map OpenGL ES 2/3:

It would certainly be possible to port a CPU emulation of OpenGL such as
Mesa, but this probably would not be competitive with the GPU in terms of
performance. Also, even on systems without a GPU, or where the GPU is
unavailable due to driver issues, performance still will lag. In Chrome for
instance, we recently started building in a high speed JITing software
emulation of WebGL called SwiftShader. Redirecting through this
implementation would likely beat a port of something into bare wasm unless
you implemented a compiler from GLSL to wasm, and probably even with that
because SwiftShader's JIT uses SIMD (which we are still working out
extending wasm with).

As I take it you're looking for a useful library / application to port,
perhaps you can tell us more about the timeframe available and constraints?



On Tue, Oct 31, 2017 at 1:49 AM Chris Kim <> wrote:

> Hello,
> My name is Chris and I'm starting the production project phase of my
> software engineering residency at Codesmith. Some of our alumni have worked
> with WebAssembly, and my team and I are also really excited to work with
> WebAssembly.
> We were wondering if you could offer any feedback or advice based on
> WebAssembly:
> One idea we have is an easy-to-use implementation of the C++ graphics
> library OpenGL piped through WebAssembly for the browser. We know that
> WebAssembly offers performance benefits in compiling low-level languages
> such as C/C++ to the browser, but is there enough of a performance
> difference from WebGL for it to be worth it?
> Any feedback or advice you can offer would be greatly appreciated! Thank
> you!
> Best Regards,
> Chris Kim

Received on Tuesday, 31 October 2017 08:56:46 UTC