[AD] al_put/draw_pixel() speed

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


Both pixel putting functions in 4.9(.12) are described as "This
operation is slow on non-memory bitmaps" via the manual.

Windows 7, D3D driver:

Using al_put_pixel() on exactly one pixel of a video bitmap drops my
framerate from 350 to 20. (Perhaps the documentation should substitute
"worthless" for "slow," heh.) But using al_draw_pixel() doesn't harm
the framerate at all, despite the manual saying it will. So why is it
so much faster than put_pixel?

Locking the bitmap with either pixel functions drops the framerate to 20.

So is the manual incorrect, or am I just lucky that al_draw_pixel() is
fast. What about the other al_draw_*() primitives?

Now to come think of it, I didn't have this horrible 350 to 20
slowdown until after I used a sub-bitmap. So another question: why did
al_put_pixel() slow down to a snail's speed after changing the video
bitmap to a sub-bitmap of a video bitmap?

I can put together simple test programs, but I don't want to bother if
the answer is "it's supposed to be that slow."

Also, I believe the manual is outdated in the al_lock_bitmap()
section, where ALLEGRO_FORMAT_ANY should be ALLEGRO_PIXEL_FORMAT_ANY.

--
Matthew Leverton




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