Re: [AD] acquire_bitmap weirdness |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2005-12-30, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> I was just trying to update a docs patch from some time ago for
> acquire_bitmap, in response to the mouse freezing thread, but I'm not
> sure if that is enough.. acquire_bitmap just seems really weird.
One reason I never bother to use it.
> c) Make the behavior sane. What I mean is shown by the example code
> sequence from allegro.cc:
...
> I would change the behavior to this:
>
> // My proposed behavior
> acquire_bitmap(buffer_for_page_flipping); // bitmap is locked
> clear_to_color(buffer_for_page_flipping, 0); // bitmap is implicitly unlocked and locked
> circle(buffer_for_page_flipping, ...); // -
> line(buffer_for_page_flipping, ...); // -
> putpixel(buffer_for_page_flipping, ...); // -
> release_bitmap(buffer_for_page_flipping); // bitmap is unlocked
>
> I.e., acquire_bitmap would be the *only* way to permanently lock a
> bitmap, and release_bitmap would be the *only* way to permanently unlock
> a bitmap.
This is the behaviour I expect as well. I would go for c).
Peter