Re: [AD] Hardware accelerated blending

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


On Thu, 30 Dec 2004 14:14:34 +0100, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> I'd also like to hear Angelo's comment on the idea posted a while back to
> eliminate the need for END_OF_MAIN() in MacOS X by forking() from
> install_allegro and returning from the child but not the parent. It'll
> probably be that it doesn't work, but I'd still like to have confirmation
> of that ;)

I remember, we discussed this on IRC some time ago, and the result
was, fork is useless - since you would need IPC to talk between child
and parent, since they would for example not share memory. Something
like the linux clone call could be useful, i.e. something which
creates a thread, but uses the fork semantics instead of a function
pointer - but it doesn't seem such a thing exists for OSX.

There was some other ideas, some of which would look nicer than
END_OF_MAIN, but still require something similiar. E.g. we could have
allegro_init(my_main) - and it would never return, but instead all
user code to be executed would be in the function my_main (which then
on OSX could be in its own thread). Or we could require to use
al_main() instead of main(), and the real main provided by Allegro
would, on OSX, run it in another thread (and the input handler in the
main thread). They don't change anything principally,  but would get
rid of the ugly END_OF_MAIN macro.

The compatibility layer always would need END_OF_MAIN of course.




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