Bullet 2.68 Soft+Rigid Body OSX Universal Beta Test

Moderator
Posts: 3,573
Joined: 2003.06
Post: #16
erwincoumans Wrote:I'm currently trying out on the iPhone SDK, and might check out a better GUI.
Well, you'd really have no choice but to use a completely different GUI if you were to do a demo on the iPhone because of the limited screen space. Problem is, there is no way to develop OpenGL ES on it right now, not even in the simulator. Supposedly we'll be able to work with it when they release iPhone OS 2.0 at the end of June. For now, I made my own sort of simulator on OS X for it, which is just a properly sized window to match the iPhone resolution, and linking against the iPhone OpenGL ES headers instead of the system headers, plus using the software renderer to throttle performance back. It is getting me by so far, but there is no way to know what performance will be like on the actual device. I don't see any reason why you couldn't do the same on another platform like Windows for now, to get ready.

As far as other iPhone-like GUI elements, couldn't say because of NDA, except that I'm not having luck with the SDK working properly in that department.

Quote:Can someone recommend an easy to use OSX GUI app as starting point, that already has OpenGL support?
Sadly, I can't think of one which is all OpenGL for the GUI and Mac-like. I just use a native Cocoa GUI (window, menus and widgets like buttons and sliders) containing an OpenGL view for the rendering. I doubt you'd want to spend the extra effort right now to jump into Cocoa, so that probably isn't practical. If you're interested, I might be able to help out a little there. We have an open source windowing framework, called GameBase over at SourceForge, which might make it easier:

http://idg-inkubator07.svn.sourceforge.n...ork/trunk/

Otherwise, you might use GLUT or SDL to get out of a Terminal launch, as you currently have it, which would help get it at least a little closer to Macness I suppose. You'd still need to use your current OpenGL GUI widgets, but it'd be a fair start IMHO.
Quote this message in a reply
Moderator
Posts: 3,573
Joined: 2003.06
Post: #17
Ooh, I just missed that TommorowPlusX volunteered for duty. You'd be in great hands there! Grin
Quote this message in a reply
Member
Posts: 27
Joined: 2006.07
Post: #18
Quote:you might use GLUT or SDL to get out of a Terminal launch
Not sure what you mean. Can't you just click on the executable?
Quote: develop OpenGL ES on it right now, not even in the simulator.
Actually, I have full access to iPhone SDK beta program, and have several OpenGL ES sample applications running fine on the device. (can't tell more due to NDA)

Does anyone have any basic project that uses OpenGL that shows how to mix C++ and Objective-C? (ideally XCode projectfiles) That would be useful for both OSX and iPhone SDK.

You help is appreciated,
Erwin
Quote this message in a reply
Member
Posts: 27
Joined: 2006.07
Post: #19
TomorrowPlusX, if you want to try out using Bullet, I would recommend waiting for full Bullet 2.68 release. Expect that early next week.

And if you have any issues, please use the Bullet forums at http://bulletphysics.com
Thanks,
Erwin
Quote this message in a reply
Moderator
Posts: 3,573
Joined: 2003.06
Post: #20
erwincoumans Wrote:Not sure what you mean. Can't you just click on the executable?
Sure, but it shows up on the desktop as a UNIX executable, not a proper Mac application. So it launches Terminal first and then launches GLUT. This really isn't strictly an issue for a tech demo though. I kind of regret complaining about it in the first place now, sorry.

Quote:Actually, I have full access to iPhone SDK beta program, and have several OpenGL ES sample applications running fine on the device. (can't tell more due to NDA)
Awwww... Shot down! You lucky dog! Rasp

Quote:Does anyone have any basic project that uses OpenGL that shows how to mix C++ and Objective-C? (ideally XCode projectfiles) That would be useful for both OSX and iPhone SDK.
Not sure about useful for both OS X and the iPhone, but there should be plenty of examples around -- just can't think of one since I'm either C or Objective-C. Should be some examples at ADC if I remember correctly. TomorrowPlusX is a C++ fiend though, and should have info for you.
Quote this message in a reply
Moderator
Posts: 3,573
Joined: 2003.06
Post: #21
Hmph... I looked at ADC and didn't find any OpenGL using Objective-C++ examples. Strange. I could've sworn I saw one before... I don't know if you've seen it yet, but here's a little on mixing Objective-C and C++.

I'm not sure how folks are doing it with C++ nowadays, but the way we did GameBase was to create a fully native Cocoa windowing framework for all the native GUI stuff (and more), and then provide just a few attachment points for a straight C game (which could also be a C++ game of course). This is essentially done through an init call, an update call, and a draw call (inspired by XNA, actually). All the underlying Cocoa stuff need have nothing to do with the game (or engine or what have you), it just provides the native window and GUI elements and stays separate and out of the way.

[adding] Any GUI widgets you'd need *inside* your GL view would still have to be custom, non-native elements, so you'd still need your own GUI engine in that case, like in a full screen iPhone game. As for custom GUI widgets you should take a gander at TomorrowPlusX's stuff -- very nice!
Quote this message in a reply
Member
Posts: 27
Joined: 2006.07
Post: #22
Quote:here's a little on mixing Objective-C and C++.
Haven't seen that one, I will check it out.

Hope we can work something out with TomorrowPlusX,
Thanks!
Erwin
Quote this message in a reply
Member
Posts: 312
Joined: 2006.10
Post: #23
Here's unknown's OpenGL Template. It's easy enough to use Objective-C++. Just change the .m files to .mm and then use Objective-C++ like normal.

http://fax.twilightcoders.net/files/Coco...cation.zip
Quote this message in a reply
Moderator
Posts: 623
Joined: 2007.09
Post: #24
Works here; Mac OS 10.5.2 intel. Really sweet demo!

- Lincoln Green
http://www.binkworks.com/
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #25
I get a bus error. (MBP, 10.4.11). So does my friend (PBG4, 10.4.11).

And for me, double-clicking the executable opens the file in an editor. I had to run it from the Terminal.
Quote this message in a reply
Member
Posts: 27
Joined: 2006.07
Post: #26
Is there a 'backward compatibility' switch for XCode projects?

It looks like Tiger is not supported indeed,
Thanks,
Erwin
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #27
erwincoumans Wrote:Is there a 'backward compatibility' switch for XCode projects?

It looks like Tiger is not supported indeed,
Thanks,
Erwin

If you double click the project icon in the browser it will bring up the project settings pane. Near the top you will see "Base SDK". If you chose not to install the 10.4 SDK when installing the dev tools, you'll have to go back and install it. (I think it installs by default, but don't remember)

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Moderator
Posts: 3,573
Joined: 2003.06
Post: #28
I think it does install the 10.4 SDK by default, but I seem to recall having to explicitly check the 10.3.9 option upon install IIRC... (hazy here too)

Anyway, don't forget that it's not necessarily good enough for Xcode that you select the correct SDK base path in the project settings, indeed it isn't good enough that you select anything just once.

THIS WILL BITE YOU IN XCODE, SO DON'T FORGET IT:

1) In Xcode, you can get/set info for the project in general (like Skorch pointed out above by double-clicking or right clicking and getting info on it), and you can also get/set info for the particular target underneath the red bulls-eye, further down in the Groups & Files pane the same way. Whatever you set in the target overrides settings in the overall project one above! <--- don't forget this

2) That's not enough to remember... There are different deployment configurations: Release and Debug. You must remember to make sure the settings are correct (what you want) for each configuration. <--- don't forget this either or I promise it will drive you mad ... utterly MAD!
Quote this message in a reply
Moderator
Posts: 623
Joined: 2007.09
Post: #29
It installs 10.4 by default. 10.3 you have to select.

- Lincoln Green
http://www.binkworks.com/
Quote this message in a reply
Member
Posts: 27
Joined: 2006.07
Post: #30
Wolfgang Engel helped out with a great Objective-C / C++ graphics framework, called the Oolong Engine 2.

Bullet 2.68 is now running fluently on the official iPhone SDK.

See http://www.oolongengine.com
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Collision detection using the Bullet physics engine MikeD 0 2,894 Aug 30, 2010 11:14 AM
Last Post: MikeD
  SCUBA beta test bruss14 5 3,295 Oct 2, 2008 10:02 AM
Last Post: macmini