Replies: 2 comments
-
There is no feature like this at the moment in the rendering context that would track changed pixels, because in general this would an an overhead. Not saying it's impossible to provide, but then it would have to be clarified how should that work. If you render an empty image (all pixels transparent) - should that count in bounding box calculations? Because if so then the engine would have to trace every composited pixel, which would not be good for performance. If only input geometry would be traced then it would be pretty cheap to do in terms of cpu cycles. |
Beta Was this translation helpful? Give feedback.
-
Yeah I'd only need it to track pixels that need to be re-composited to the screen, so ignoring transparent pixels would be fine for my use. I'm just using the bbox calculation on the path right now which is probably good enough, I can always a buffer it a bit if I need to and the worst case is I over-blit to the screen a tiny bit. |
Beta Was this translation helpful? Give feedback.
-
I'm playing around with using blend2d to build a 3d-geometry viewer for S2. I like to use a push model for graphics where I mark regions of my pixbuffer dirty for later blitting to the screen, rather than the typical game loop of redrawing a new-frame constantly no matter what.
In that vein I'm curious if it's easy to query a bounding box from
BLContext
after drawing to figure out what region was drawn to. It's possible to just estimate that from what you're drawing but probably more accurate and faster to just get it from the context. If that capability doesn't exist, I'd be happy to add it if it was desired.Beta Was this translation helpful? Give feedback.
All reactions