Re: [AD] Re: Intermittent problem with blit on Mac

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


> Yes, I create a thread that handles displaying the
> game graphics from within main() using pthreads.  This
> display thread runs without interuption from network
> processing or user input processing. As soon as it
> finishes assembling one frame buffer, it starts the
> next.

Just to be clear on this and to make sure that you're aware of this, but
Allegro 4.2 is NOT thread-safe. Calling Allegro functions from different
threads is NOT supported and can lead to problems.
That said, it's something we'd want to fix, so trying it and reporting
problems where they occur is a good thing. In particular I feel that doing
all drawing operations from a seperate thread of everything else should be
fine. However, I don't think we'll fix problems in the 4.2 branch (others
may disagree, but that's what I think about it) but in the 4.3 branch. So
by all means, keep those reports coming!

> certain aspects of the problem, it strikes as a
> possible thread permissions problem although the fact
> that draw_sprite() works when replacing blit() in the
> failure cases kind of throws that theory for a loop.

draw_sprite() and blit() can do very different things, despite being so
similar. I doesn't strike me as impossible that one would work and the
other would not. You'd probably need to have a look at their respective
(MacOS X specific) implementations to see what the difference is.

Thanks for your help and good luck with the debugging!

Evert





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