Re: [AD] Hardware accelerated blending |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] Hardware accelerated blending
- From: Elias Pschernig <allefant@xxxxxxxxxx>
- Date: Fri, 31 Dec 2004 00:45:01 +0100
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=ThU455IEPO1iWuppK2qRIl/pVZy55CkJhWQsYEIvrghtnkuxm3+YYXdAnY7BEHzYd6/8zH7YadOWkTS2u3sO20vZqBAVe4srMWBKhVYpvpULZR4v1PP5ZvG//b6D4k0o0X2MikLyetEas3glx85WIsftQkTDTxLxL7XrgHi8R0Y=
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.