Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


I know, AGG is just a set of primitives but not an abstraction like class Graphics {...}. But that one can be assembled from them. Did it once for early versions of Sciter.

Ideally GPU and CPU rendering backends should have pixel perfect match that makes "adding new 2D backend" tricky at best.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: