-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Oh good, on-topic discussion :-)
On Tue, 14 Mar 2006, Karsten Otto wrote:
Hello everybody,
Good news from the Ter'angreal on MacOSX front! Well, sort of...
By accident I found the reason why terangreal (and assumedly wxterangreal)
just get stuck when I run them on my Mac. Terangreal uses its own main event
loop (main.cc), which emulates the functions of the default CrystalSpace run
loop. However, on the Mac CS needs to use a *different* run loop, as the code
in csutil/generic/runloop.cpp clearly states. And sure enough, there is a
different one in csutil/macosx/OSXAssistant.cpp.
Oh man. I forgot that Cocoa was annoying like that and didn't provide a
GetEvents() type function. Which means Cocoa absolutely, positively must
control the toplevel run loop and makes cooperative run loops impossible.
I guess you should expect this kind of control freak behavior from a
company run by Steve Jobs :-)
So I changed the code of apps/terangreal/main.cc like this:
if (terangreal->Initialize ())
{
/*
while (!terangreal->wantToQuit) {
terangreal->DoFrame();
}
*/
csDefaultRunLoop(object_reg);
}
Okay, this is probably a valid fix, provided we still have a way to quit
:-)
and sure enough, when starting it the "busy" spinner disappears!
I can even rotate the view by dragging the mouse!
Does the entire scene load correctly? You mentioned you were having
problems with that before? Also, for mouse navigation, you use the right
mouse button (command-click in OS X I think?) to toggle between mouselook
mode and browsing mode, and in mouselook mode the left mouse button makes
you walk forward. So if the mouse works, you should be able to move
around.
Apart from that however, I cannot move around or anything. I assume
Terangreal handles keyboard input etc. by itself in its custom run loop?
Perhaps it is failing to get keyboard focus in some way? Does walktest in
Crystal Space work? All the keyboard handling in terangreal is with the
event system provided with CS, we arn't doing anything strange.
Still, it is a step in the right direction... But since I know next to
nothing about CrystalSpace, and even less about WX, could someone more
versed in these arcane arts please fix (wx)terangreal to use
csDefaultRunLoop() ?
WxTerangreal uses the Wx runloop, which should itself be implemented using
the Cocoa runloop. The wxgl plugin takes wx events and translates them
into CS events. I don't think there should be any problem there... The
place to start is really with the "wxtest" program in CS, which I think
you mentioned does not work either (it should be displaying a room which
you can move around in)? You might want to bring this issue to the
Crystal Space mailing list.
[ Peter Amstutz ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFEFy7JaeHUyhjCHfcRAv9mAKCTDaB+bvugUoVJ5/5DrDOjGcmG4wCbBIcp
Tendj3aXrGr9A9+I5b8Jx4k=
=2OY4
-----END PGP SIGNATURE-----
_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d