iDevGames Forums
drawing - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: drawing (/thread-5367.html)

Pages: 1 2 3


drawing - Lord Vader - Jun 28, 2005 07:00 PM

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?


drawing - OneSadCookie - Jun 28, 2005 07:02 PM

OpenGL. QuickDraw is deprecated and Quartz is slow.


drawing - Leisure Suit Lurie - Jun 28, 2005 07:05 PM

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.


drawing - Lord Vader - Jun 28, 2005 09:22 PM

I guess openGL would be best because i can use of for 3D games as well and its universal.


drawing - PowerMacX - Jun 28, 2005 09:28 PM

Some related threads:
http://www.idevgames.com/forum/search.php?searchid=87303


drawing - kodex - Jun 29, 2005 03:49 AM

Ohh and welcome to the forums.


drawing - TomorrowPlusX - Jun 29, 2005 04:58 AM

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.


drawing - Taxxodium - Jun 29, 2005 08:26 AM

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.


drawing - TomorrowPlusX - Jun 29, 2005 10:36 AM

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 ).


drawing - Duane - Jun 29, 2005 11:05 AM

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.


drawing - Lord Vader - Jun 29, 2005 11:24 AM

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?


drawing - Lord Vader - Jun 29, 2005 11:51 AM

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?


drawing - szymczyk - Jun 29, 2005 12:13 PM

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.


drawing - sealfin - Jun 29, 2005 12:30 PM

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>


drawing - OneSadCookie - Jun 29, 2005 03:56 PM

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