Re: [AD] al_put/draw_pixel() speed

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 2009-08-08 at 10:52 -0500, Matthew Leverton wrote:
> 
> 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)."

Well, right now many of the other drawing functions work. Originally,
auto-locking was in place everywhere, but in my opinion it just made the
code unnecessarily complex (e.g. when not full bitmaps but only regions
are locked, or when the locked format is different from the bitmap
format).

> "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."
> 

That's just false. I think it has to do with the way the D3D driver
implements it (locking, drawing the pixel, unlocking). But that should
be fixed in the driver - it obviously will be faster when only locking
once - but the only sane way is to never lock. In OpenGL GL_POINTS is
used to draw single pixels, something similar should be used.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/