drawing

Lord Vader
Unregistered
 
Post: #1
Hi, i just started to get into game programming and bought the book mac game programming. I started reading but saw it uses quickdraw. Should i use quickdraw, openGL, or quarts?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
OpenGL. QuickDraw is deprecated and Quartz is slow.
Quote this message in a reply
Moderator
Posts: 529
Joined: 2003.03
Post: #3
Lord Vader Wrote:Hi, i just started to get into game programming and bought the book mac game programming. I started reading but saw it uses quickdraw. Should i use quickdraw, openGL, or quarts?

Don your helmet, Lord Vader. You are about to be beaten with the OpenGL stick.

"Yes, well, that's the sort of blinkered, Philistine pig-ignorance I've come to expect from you non-creative garbage."
Quote this message in a reply
Lord Vader
Unregistered
 
Post: #4
I guess openGL would be best because i can use of for 3D games as well and its universal.
Quote this message in a reply
Moderator
Posts: 770
Joined: 2003.04
Post: #5
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #6
Ohh and welcome to the forums.

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #7
The barrier to entry for making *good* looking 2D OpenGL is a bit high, though. Whereas good looking 2D is pretty easy in Quartz.

I'm not saying you shouldn't use GL -- because you should -- but don't get discouraged because it's hard.
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #8
OneSadCookie Wrote:..Quartz is slow.


Not in Tiger, since it uses OpenGL. But if your audience is not going to be Tiger only, then yes, go with OpenGL.

The only hard thing I found with GL was texture mapping, I still have problems with it. But other stuff should be easy enough.

"When you dream, there are no rules..."
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #9
Quartz is still slow on Tiger. It's faster than Panther, yes, but not as fast as GL. Perhaps when they enable Quartz2DExtreme or whatever it'll get fast enough, but they haven't ( and presumably for good reason ).
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #10
I can't find a single reason to go with Quartz over opengl for games. It's not meant for it, that's what opengl is made for. It's even fairly easy to learn, at least the 2d stuff is.

It's not magic, it's Ruby.
Quote this message in a reply
Lord Vader
Unregistered
 
Post: #11
I bought the book mac game programming and it uses quickdraw for all drawing, sprites, ext. Can openGL do all that stuff? Any one know of a good place to start?
Quote this message in a reply
Lord Vader
Unregistered
 
Post: #12
i am confused. I've started looking at openGL stuff and i see all kinds of GLUT stuff and AGL and CGL... I would like to use carbon to do my programming, what should i do?
Quote this message in a reply
Member
Posts: 111
Joined: 2002.06
Post: #13
Lord Vader Wrote:I bought the book mac game programming and it uses quickdraw for all drawing, sprites, ext. Can openGL do all that stuff? Any one know of a good place to start?
OpenGL can do all that stuff. Gamedev.net (http://www.gamedev.net) has some articles on using OpenGL for 2D games.

I'm slowly working on updating the Mac Game Programming code to use OpenGL for graphics. I haven't had time to work on it lately, but I should have more time later in the summer.

To answer your question about GLUT, AGL, and CGL, they're all libraries to get your OpenGL graphics to appear on the screen. Here's the difference between them:

GLUT also does event handling for you. GLUT is cross-platform so your GLUT code will also run on Windows and Linux. GLUT is a good way to get started with OpenGL, but you wouldn't want to ship a game using it.

CGL works only on Mac OS X, and it only does fullscreen graphics. CGL won't draw in a window.

AGL works only on Mac OS (9 and X) and can draw in windows and fullscreen. If you want to draw in a window using Carbon and don't want to use GLUT, you must use AGL.

I wrote a tutorial for iDevGames about AGL a few years ago. You can download it from my website, which is in my signature.

Mark Szymczyk
http://www.meandmark.com
Quote this message in a reply
Moderator
Posts: 691
Joined: 2002.04
Post: #14
In addition to AGL, CGL, and friends, there is also SDL for creating your OpenGL context (which can be either windowed or fullscreen), and which, like GLUT, takes care of event handling.

SDL also has a lot of supporting libraries for extending it's capabilities (for example SDL_image for the loading of files in more image-formats than 'vanilla' SDL supports, SDL_mixer for audio loading and playback), and is also, again like GLUT, cross-platform, supporting Mac OS X (or why else would I be recommending it?), Windows, and Linux, plus a lot of more obscure systems.

Quote:Can openGL do all that stuff?
<plug>Yes, check out the games linked in my signature Rasp</plug>

Mark Bishop
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #15
Taxxodium, Quartz only uses OpenGL in Tiger if Quartz 2D Extreme is enabled, which it's not by default, and requires a high-end GPU to work. Even then, OpenGL isn't used for everything.

Yes, Quartz in Tiger, particularly with Quartz 2D Extreme, is substantially faster than Quartz on Panther, but it's still slow by any reasonable definition Smile
Quote this message in a reply
Post Reply