Horde3D http://horde3d.org/forums/ |
|
Horde - Mac integration sample http://horde3d.org/forums/viewtopic.php?f=4&t=435 |
Page 1 of 1 |
Author: | swiftcoder [ 19.07.2008, 22:12 ] |
Post subject: | Horde - Mac integration sample |
I am currently working up a sample to demonstrate integrating Horde directly with the Cocoa environment on Mac OS X. Full size image The sample is basically a direct port of the knight sample to a GUI environment, and is not yet complete. In particular, I am still chasing an FBO bug related to clearing the buffer when in windowed mode (visible in the above image). I also plan to write a tutorial for the Wiki detailing the process (as well as posting the source code, of course), as there are a couple of likely stumbling blocks along the way. |
Author: | swiftcoder [ 19.07.2008, 23:01 ] |
Post subject: | Re: Horde - Mac integration sample |
The app is now basically finished (a few bugs proved easier to track down than I had expected). If you have a Mac, you can download the sample, and give it a spin: newer binary below Drag in the view to rotate the camera, and use WASD to move. Along the way I discovered that the samples won't run as is on a PowerPC Mac, because the Geo and Anim files in the content directory were all created on Little Endian machines, and the engine doesn't take endianess into consideration when opening them. Hopefully I can find time to remedy this somewhere down the line. |
Author: | stuckie [ 19.07.2008, 23:27 ] |
Post subject: | Re: Horde - Mac integration sample |
I'll give them a go on the Mac we have on Monday... we'd like to have our game running on the Mac, but we've got one with an ATI x1600, so it may be a no-go area, and we'll need to throw in the forward rendering pipeline again ( we went deferred so our artists could create a better atmosphere, with more lights and shader work available to us. ) The Mac still somewhat scares me for creating binaries for, as I've only ever really done so under Linux and Windows.. we also have the problem in that we don't have XCode installed ( or any development stuff ) on the Mac, so I've been cross-compiling some things from my Linux machine... though currently all I've gotten is the usual "Hello World!" program done and a few SDL tests as CMake didn't seem to want to co-operate in cross-compiling Horde3D much. At any rate, we need the game finished on one platform first just would be nice to compile to three platforms from the same source tree It already does with Windows and Linux, so far! But yea, congrats on getting Cocoa to play nice with Horde.. from what I've heard, it's a bit mental like WinAPI in places ( or worse, straight XLib! hehe ) |
Author: | swiftcoder [ 19.07.2008, 23:53 ] |
Post subject: | Re: Horde - Mac integration sample |
stuckie wrote: we'd like to have our game running on the Mac, but we've got one with an ATI x1600, so it may be a no-go area, and we'll need to throw in the forward rendering pipeline again... I am running this on a MacBook Pro, with the x1600 mobility. It runs pretty well, but I haven't tried to get a deferred pipeline running.Quote: The Mac still somewhat scares me for creating binaries for, as I've only ever really done so under Linux and Windows.. we also have the problem in that we don't have XCode installed ( or any development stuff ) on the Mac, so I've been cross-compiling some things from my Linux machine... though currently all I've gotten is the usual "Hello World!" program done and a few SDL tests as CMake didn't seem to want to co-operate in cross-compiling Horde3D much. The CMake setup for Mac pretty much works (although missing many features), though I think you will need to install the XCode tools (just to get the compiler). Cross compiling is a bit hairy, because Apple's GCC is very heavily patched - you pretty much have to build GCC from their sources on linux.Quote: But yea, congrats on getting Cocoa to play nice with Horde.. from what I've heard, it's a bit mental like WinAPI in places ( or worse, straight XLib! hehe ) In some ways it is much better (high level, well designed, etc.), unfortunately, it is also written in Objective-C, which is enough different from C++ to give some major headaches on first encounter.
|
Author: | stuckie [ 20.07.2008, 12:03 ] |
Post subject: | Re: Horde - Mac integration sample |
I forgot I would be heading into uni today, so I've just tried the binary on the Mac here. It crashes in what seems to be a rather bad way.. having had little experience with Mac development, I'm not quite sure what's wrong, but I do have a backtrace if it's of any use to you: Code: Date/Time: 2008-07-20 11:48:42.940 +0100 OS Version: 10.4.11 (Build 8S2167) Report Version: 4 Command: MacIntegration Path: /Users/s.campbell/Desktop/MacIntegration.app/Contents/MacOS/MacIntegration Parent: WindowServer [66] Version: ??? (1.0) PID: 226 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000 Thread 0 Crashed: 0 com.yourcompany.Horde3D 0x00210fdf EngineLog::writeDebugInfo(char const*, ...) + 21 1 com.yourcompany.Horde3D 0x00219701 setNodeTransform + 245 2 com.yourcompany.MacIntegration 0x000036c4 -[MyOpenGLView drawRect:] + 1210 3 com.apple.AppKit 0x932f5e91 -[NSView _drawRect:clip:] + 3228 4 com.apple.AppKit 0x932f4eeb -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 614 5 com.apple.AppKit 0x93306e4f _recursiveDisplayInRect2 + 149 6 com.apple.CoreFoundation 0x9083eaa8 CFArrayApplyFunction + 307 7 com.apple.AppKit 0x932f50f3 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1134 8 com.apple.AppKit 0x93306e4f _recursiveDisplayInRect2 + 149 9 com.apple.CoreFoundation 0x9083eaa8 CFArrayApplyFunction + 307 10 com.apple.AppKit 0x932f50f3 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1134 11 com.apple.AppKit 0x932f3f53 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 217 12 com.apple.AppKit 0x932f3658 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 290 13 com.apple.AppKit 0x932f2e42 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 523 14 com.apple.AppKit 0x932f276e -[NSView displayIfNeeded] + 439 15 com.apple.AppKit 0x932f2512 -[NSWindow displayIfNeeded] + 168 16 com.apple.AppKit 0x93297e54 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 1225 17 com.apple.AppKit 0x9329793a -[NSWindow orderWindow:relativeTo:] + 104 18 com.apple.AppKit 0x93370038 -[NSWindow orderFront:] + 49 19 com.apple.AppKit 0x9326e20e -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1171 20 com.apple.AppKit 0x93265479 loadNib + 260 21 com.apple.AppKit 0x93264ea9 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 918 22 com.apple.AppKit 0x93264b0a +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 164 23 com.apple.AppKit 0x93264a4c +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 392 24 com.apple.AppKit 0x93264794 NSApplicationMain + 433 25 com.yourcompany.MacIntegration 0x00002006 _start + 216 26 com.yourcompany.MacIntegration 0x00001f2d start + 41 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x00210fd3 ecx: 0x0031ae00 edx: 0x00000000 edi: 0x00000000 esi: 0x00000000 ebp: 0xbfffec78 esp: 0xbfffec50 ss: 0x0000001f efl: 0x00010286 eip: 0x00210fdf cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 Model: iMac5,1, 2 processors, Intel Core 2 Duo, 2 GHz, 1 GB Graphics: ATI Radeon X1600, ATY,RadeonX1600, PCIe, 128 MB Tried to remove any useless stuff, but may have removed a bit too much ( or maybe even not enough, heh) .. if you do need the rest of it, let me know and I'll post the entire backtrace Course, running it from a terminal gives perhaps slightly more useful errors: Code: 2008-07-20 11:56:02.319 MacIntegration[248] invalid pixel format attribute 2008-07-20 11:56:02.319 MacIntegration[248] invalid pixel format 2008-07-20 11:56:02.320 MacIntegration[248] invalid context 2008-07-20 11:56:02.323 MacIntegration[248] invalid pixel format attribute 2008-07-20 11:56:02.323 MacIntegration[248] invalid pixel format 2008-07-20 11:56:02.323 MacIntegration[248] invalid context Bus error As far as I'm aware, IT are upgrading the Macs to 10.5 sometime this week, which may help.. I may ask nicely for them to shove XCode on this one as well but basically, this seems to be a clean install of Mac OS X 10.4.11 with very little actually on it.. which was generally why I was trying to cross-compile on my Linux machine so I'd be able to see if it'd work without any extra stuff that XCode may install. I hope some of those error logs were of use to you, but I think it might just be something like it's built for 10.5 so 10.4 wont run it, or a library isn't fully up to date on this machine. |
Author: | swiftcoder [ 20.07.2008, 15:21 ] |
Post subject: | Re: Horde - Mac integration sample |
stuckie wrote: I hope some of those error logs were of use to you... Thanks very much, you exposed a bug with the order of initialisation on 10.4 - the new binary should fix this: MacIntegration.app.zipAlso, if you get a chance to run it, does the knight appear transparent (i.e. can you see the ground through him)? He has been on my machine for a few days now, and I am not sure why. |
Author: | stuckie [ 20.07.2008, 15:42 ] |
Post subject: | Re: Horde - Mac integration sample |
Well, it now doesn't seem to do the Mac equiv of a segfault when double clicking the .app, however it still doesn't work, I'm afraid. Running through the console gives some extra help to why though: Code: 2008-07-20 15:35:02.319 MacIntegration[229] invalid pixel format attribute 2008-07-20 15:35:02.319 MacIntegration[229] invalid pixel format 2008-07-20 15:35:02.320 MacIntegration[229] invalid context terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct NULL not valid Abort trap I'm guessing that some string for checking which OS X version is installed, isn't grabbing it right - hence the NULL? Probably completely wrong, but it's atleast a string error Unfortunately, I'm about getting ready to head home for the day, so I won't be able to test anything else till tomorrow... I also don't know if IT will be upgrading this machine first thing in the morning, so I'll head in for when uni opens, so I can test a bit more for you before they do |
Author: | swiftcoder [ 20.07.2008, 16:00 ] |
Post subject: | Re: Horde - Mac integration sample |
stuckie wrote: Running through the console gives some extra help to why though: Any idea what hardware this is running on? I can't quite figure out why the pixel format would be unavailable.Code: 2008-07-20 15:35:02.319 MacIntegration[229] invalid pixel format attribute 2008-07-20 15:35:02.319 MacIntegration[229] invalid pixel format 2008-07-20 15:35:02.320 MacIntegration[229] invalid context terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct NULL not valid Abort trap Quote: I'm guessing that some string for checking which OS X version is installed, isn't grabbing it right - hence the NULL? Probably completely wrong, but it's atleast a string error I am not handling C++ exceptions at the moment, so who knows where that crops up, but presumably it is due to horde being initialised without a valid OpenGL context.
|
Author: | stuckie [ 20.07.2008, 23:26 ] |
Post subject: | Re: Horde - Mac integration sample |
Short of what the backtrace states that it's an Intel Core 2 Duo, with a 128mb ATI Radeon X1600, I don't know much else, I'm afraid.. if you can give me a hint of what I'm looking for and where, I'll post the information up as soon as I get in, in the morning [edit] Alright the About This Mac thing tells me: 2Ghz Intel Core 2 Duo with 1Gb Ram. It's model identifier is iMac5,1 Amusingly, the graphics card says "ATY RadeonX1600" ... rather than ATI It's Mac OS X 10.4.11 Kernel Version is Darwin 8.11.1 If you need any more info, let me know [/edit] |
Author: | vibber [ 01.09.2013, 22:31 ] |
Post subject: | Re: Horde - Mac integration sample |
Hi there, I am trying to get started with Horde on OSX and this example of yours that you posted in the forum - well years ago. Do you happen to have the source code still? Would you mind sharing? The knight binary works fine on my machine today. The reason I'm asking is that I am having trouble running the built in examples that come with horde. And it would help a lot to see what you did. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |