Re: [AD] al_put/draw_pixel() speed |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] al_put/draw_pixel() speed
- From: Matthew Leverton <meffer@xxxxxxxxxx>
- Date: Sat, 8 Aug 2009 10:52:18 -0500
On 8/8/09, Milan Mimica <milan.mimica@xxxxxxxxxx> wrote:
> The real question is, why does al_put_pixel() always perform locking, even
> though the GFX driver might support some kind of drawing to textures?
>
I know nothing about the gfx drivers, other than they slow down to a
crawl most of the time. The main problem here is with sub bitmaps. My
application ran at 350 fps until I introduced a sub bitmap. Once I did
that, drawing 1 pixel via al_put_pixel drops it to 20 fps.
On 8/8/09, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> My understanding always was this:
>
> al_draw_pixel:
>
> * normal drawing function like al_draw_line and so on
> * always accelerated
> * illegal to use on locked bitmaps
>
I quote the manual: "While a bitmap is locked, you can not use any
drawing operations on it (with the sole exception of al_put_pixel and
al_draw_pixel)."
"This operation <al_draw_pixel> is slow on non-memory bitmaps.
Consider locking the bitmap if you are going to use this function
multiple times on the same bitmap."
--
Matthew Leverton