One way to optimize this would be to not pre-apply transformations until
there's a transformation change. That'd at least take care of the common
case of people not changing transformations mid-frame. It's a little
complicated.
Another way would be to just screw the people who do that and flush the
bitmap cache every time the transformation changes.
-SL
On 08/17/2015 07:35 PM, SiegeLord wrote:
My opinion on this was that when this starts hitting you, you stop using
`al_draw_bitmap`. I made a library based on primitives addon that avoids
this pre-transformation issue: https://github.com/SiegeLord/FastDraw,
and it routinely draws things 2-3x faster.
It's too late now, but I was always against this feature. It did not
strike the right balance between convenience and performance.
-SL
On 08/17/2015 06:32 PM, Trent Gamblin wrote:
Currently when batched drawing is enabled, vertices are transformed by
the current transformation. See ogl_bitmap.c:272.
I'm wondering about this. Can't figure out why this is so by looking at
the code (I haven't yet looked too deeply...)
The reason I'm asking is I'm trying to optimize for a very slow system
(Raspberry Pi) and drawing a screenful of tiles results in a large
number of transformations which is quite slow, at least it's near the
very top of my gprof data.
Any idea as to how to optimize this would be appreciated.
Thanks.
_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers
_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers