drawing

Sage
Posts: 1,066
Joined: 2004.07
Post: #31
I didn't think it was that bad. Sure it wasn't too clear as to what went where but it got the job done. Downloading the source code for each lesson helped a bunch too. Oh well. It might not be the best, but it worked for me. Maybe it'll help others.

Sorry if it seemed like I wanted to help Ingemar. I was actually directing that to Lord Vader. My bad Smile.
Quote this message in a reply
Lord Vader
Unregistered
 
Post: #32
Is OpenGL and Carbon a bad combination?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #33
Only in as much as Carbon is a bad choice Wink
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #34
Most of us have converted over to using Cocoa with OpenGL instead of Carbon and OpenGL, so you'll hear a lot of harping from us. Carbon is perfectly fine but Cocoa does almost all of the same stuff that Carbon does (and almost always better), only *much* more easily. Carbon and Cocoa are only good for dealing with the OS environment like windows and menus, which you have to do to set up and support your drawing environment. They're both useless for the drawing code, which should be OpenGL, as you seem to have figured out.

Cocoa requires an investment of your time to learn Objective-C which is what shys most newcomers away from it. This is completely understandable because you want to get to the game making part as soon as possible right? The time invested in learning it is way worth it over the amount of time it takes to learn the same amount of functionality in the Carbon environment. This is why many of us say, "Just learn Cocoa right off the bat instead, if you're gonna do Carbon".

Faced with this dilemma of offering you either a steep hill or a steep hill, we offer other suggestions such as "Try out GLUT!", or "SDL is the way to go!". The honest truth is that NONE of it is going to be easy. The book that you have is already a bit dated and that is going to pose many difficulties for you. Sources for Carbon game programming are diminishing.

Okay, so... The overhead of learning the environment support library of either Cocoa or Carbon is pretty high either way. You really need to get to the OpenGL part right away. I would say that GLUT will get you there the fastest. I would also say that the biggest plus for going with GLUT first is that the amount of effort needed to learn it is so low that when you toss it away, you're not wasting much of your effort. Use it to learn OpenGL and take the time to decide from there which direction to take.

The bottom line is that you just can't go wrong with using GLUT initially while you decide which API you want to use in the long term... Or rather while you learn Cocoa. Wink
Quote this message in a reply
Member
Posts: 257
Joined: 2004.06
Post: #35
Plus if you learn Cocoa, then you can actually use it to write tools and other apps that strike your fancy far faster than say, using Carbon or GLUT or SDL. I mean, that's what it's there for.

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #36
My approach to the Carbon/Cocoa/OpenGL combination is to use OpenGL extensively, and isolate all system dependent code, be it Carbon, Cocoa or something else, into special units that can be easily replaced. Well, at least for a game.
Quote this message in a reply
Member
Posts: 715
Joined: 2003.04
Post: #37
OneSadCookie Wrote:Only in as much as Carbon is a bad choice Wink
I think with Apple moving toward Intel, won't Carbon be stone cold dead in a year or so?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #38
No, Carbon works fine on Intel, and will continue to -- Microsoft and Adobe at least still need it Smile

In my opinion though, Carbon is already dead. The new features of Mac OS X are being exposed either via CF-style APIs accessible easily to both Carbon and Cocoa, or via Cocoa frameworks. To use CoreImage or WebKit, for example, you have no choice but to write some Cocoa.

Add to that the fact that development with Cocoa is so much easier, and the fact that if you really need to, you can use Carbon happily from Cocoa (eg. to get at the Alias Manager), and there's really no contest.
Quote this message in a reply
Member
Posts: 79
Joined: 2002.08
Post: #39
Other than for setting up your GL context I don't see what GL has to do with either Carbon or Cocoa. The GL functions has a C API. I would think Carbon or Cocoa is very little used in a game unless you have a Mac OS UI game interface. I use Carbon mostly for file handling plus a few QuickTime calls.

But use whatever you like. Some has the idea that their way is the only way. I use what I like best and you can use whatever you want.

KenD

CodeBlender Software - http://www.codeblender.com
Quote this message in a reply
Lord Vader
Unregistered
 
Post: #40
Thanks for the advice. Ill stay with carbon for now and later move onto cocoa.
Quote this message in a reply
Post Reply