Re: [AD] windowed mode patch |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Isaac Cruz <icruzbal@xxxxxxxxxx> writes:
> And now a little question: why is vline in non-solid drawmodes SO slow? for
> example, using line is about 20 times faster than vline in my machine using
> translucent mode.
The non-solid vline() is implemented by calling putpixel(), as I couldn't be
bothered to duplicate all that drawing code, so unless the surface has
already been acquired by the caller, it is probably locking and then
releasing it once per pixel. If I'm right, this could be improved by
acquiring it at the start of the vline() loop, and releasing after the last
call to putpixel(), to avoid each putpixel() call having to do this manually.
--
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."