memononen/nanovg

Layer based drawing

prashant-saxena opened this issue · 3 comments

Hi,
The current implementation draws everything sequentially on top of last drawing shape. Is it possible to create a layer based approach?
It's like you will store all the drawing call to a layer and draw it later. For example:

  1. Draw Rectangle
  2. Store Circle
  3. Draw Rectangle
  4. Draw stored circle

Cheers

Have a look at the example_fbo.c in the nanovg project. It does something like that,

Vertex based cache, we wanted.

AFAIK there is no way to do this in nanovg as is.