Better HN
topnewbestaskshowjobs
Log inSign up

throwaway9087

8 karma · joined May 17, 2020 (6y ago) · 2 submissions

Submissions

comment 6y ago · link · parent

Practical 2D renderers implement an abstraction layer that lets them easily redirect their output to a number of low level libraries, which can be either CPU or GPU-based (or a mix). I worked on a few such 2D stacks, including OpenGL, DirectX, WebGL, and AGG based, and it took no more than a few days to add new 2D backends to an existing pipeline. Most 2D rendering is based on concepts from PostScript so it's usually easy to do such ports -- except for AGG, that one was a bit like a library from outer space. Maxim himself worked on a hardware accelerated 2D renderer for Scaleform, and it looked nothing like AGG, mostly because AGG is practically impossible to move to a GPU implementation.

comment 6y ago · link · parent

We've had some success with 2D AutoCAD on WASM, but it's not as easy as just recompiling when you are dealing with a nearly 40 year old codebase and care about pixel level accuracy. Also, it will never be as responsive as native, mouse events lag on the browser even if you are doing nothing else. AutoCAD users care a lot about such lag.

The BIM stuff (i.e. Revit) is very Windows-specific so a straight port with WASM is a no-starter.

The actual 3D rendering with WebGL is the least problem, we have that nearly solved (in terms of performance relative to desktop -- we never really needed 60fps anyway). The problem there comes in when you have a huge design that does not fit in the allocated/allowed heap space.

(throwaway for obvious reasons)