[AD] Re: Intermittent problem with blit on Mac |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: [AD] Re: Intermittent problem with blit on Mac
- From: Runesabre <runesabre@xxxxxxxxxx>
- Date: Sat, 24 Dec 2005 21:37:16 -0800 (PST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=2iK5TVzYaQkR4TaqbzT+jXs5qOLaY2WXTf3/Hhy6oaMa4G1w4NsFQwYlst33npolW/LnFXP3RyRLeU2nPAXortpV+HFNT0h2q6Erxs3DDr8q5HTgPYqa4FaEkXrtdS45yNhyqBxWtzZHQQsyoipQjgFGMhECFl7AQIwudbPNFTk= ;
> Just to be clear - are you creating another thread
yourself to > draw the
> graphics (if so, how? Using pthreads?)
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.
The main thread (the one I create that is) handles
network message processing (the network itself also
runs in its own pthread and focuses exclusively on
recving network data and putting it on a message queue
for the main thread to process when it gets around to
it), game AI, user input and animation frame
advancement for animating entities in the game.
> I'll need to do some testing but it _may_ be that
what you ask > is
> impossible. The reason is that OSX uses Mach Ports
internally > to
> communicate between processes and these ports are
tied to a particular
> thread on creation.
Not quite sure what you mean by "impossible". At any
rate, after various test changes to the code to verify
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.
> Could you possibly make a minimal program that shows
the problem? Code
> speaks louder than words!
I will work something up over the holidays and email
you the code. Thanks a lot for your help, Pete.