TweetFollow Us on Twitter

Nov 00 Online

Volume Number: 16 (2000)
Issue Number: 11
Column Tag: MacTech Online

Online

by Jeff Clites <online@mactech.com>

A few months ago we covered Quartz, Mac OS X's new 2D graphics technology based on the imaging model of Adobe's PDF. Quartz will be responsible, directly or indirectly, for most of what the user sees on the screen. What we didn't emphasize directly is that Quartz is 2D-only. Under Mac OS X, 3D graphics will be based on OpenGL. So what's OpenGL?

OpenGL is in, QuickDraw 3D is out

OpenGL is a 3D graphics library developed by SGI (then called Silicon Graphics). It's a high-performance, cross-platform library, available on Mac OS 9, Mac OS X, Windows, and many Unix variants, and many video cards provide hardware acceleration. It is the library of choice for sophisticated 3D development, most notably the gaming industry. In particular, OpenGL is the basis if id software's Quake games, and according to the company allows them to develop their products with only a tiny amount of platform-specific code. This is important for the Macintosh community, because it makes it that much more likely that games and other 3D-graphics-intensive software (such as scientific data visualization, CAD, and architectural design packages) will be available.

If you've done any 3D programming on the Macintosh in the past, you probably used QuickDraw 3D, the 3D library on Mac OS 9 and, technically, part of QuickTime (and therefore available on Windows as well). The sad news is that OpenGL is replacing QuickDraw 3D on Mac OS X, not just providing an alternative. The worst part is that, while OpenGL is the industry standard, QD-3D is much easier to use for simple 3D graphics. In fact, you could make the argument that OpenGL has a prohibitive learning curve for anyone wanting to do something simple—for instance, creating a 3D bar graph. It has a large procedural API, and it's yet another conceptual barrier you have to cross to get your application written. It also lacks QD-3D's elegant object-oriented (though still C-based) API, and well as its file format for storing 3D objects. On the other hand, you could make a strong counterargument that "simple" uses of 3D graphics are few and far between, and somewhat of an oxymoron—when's the last time you saw 3D graphics outside of a game, a screen saver, or a splash screen? In this light, there are certainly more people cheering the availability of OpenGL than are mourning the loss of QD-3D, but it would have been nice to retain an easy-to-use, high-level API, possibly layered on top of OpenGL. Although they seem to fit well together, there's no indication that Apple will go this route, and if there really are very few developers using QD-3D, it makes sense not to devote the resources to it.

Enter Quesa

Now the good news. The good news is Quesa, a third-party, open-source (LGPL) effort to recreate QD-3D from scratch—in other words, and independent library which is API-compatible with QD-3D. This approach is really a win-win situation for the Macintosh community, because it frees Apple from the burden of maintaining an API which may not be widely used, yet it will still be available to those who need it, for as long as anyone is interested enough in it to maintain it. The needs-based focus of many open-source projects is clearly present in Quesa, which was started because its founder wanted to be able to run his 3D screen saver on Mac OS X. The project is under active development, and in fact is mostly complete at this point. As a side benefit of the open-source approach, it is now truly cross-platform, available now on Mac OS 9, Mac OS X, Windows, and Linux, and coming to the BeOS as well. And as you might expect, Quesa can run on top of OpenGL, and so it will benefit from OpenGL hardware acceleration. As mentioned above, QD-3D (and hence Quesa) is object-oriented although written in C. This is interesting from a design standpoint, and is similar in spirit to Apple's new CoreFoundation API, which gives C-based access to key data types and APIs which originated in Cocoa. You can read more about Quesa's structure on its documentation page.

Quesa Resources

If you are moving into 3D graphics, there are several places you can start in order to get up to speed. If you are interested in the QD-3D/Quesa approach, you'll get a good overview from a series of articles which originally appeared in Apple's develop magazine, and you'll also want to become familiar with Apple's QD-3D documentation, which is available through the QuickTime section of their developer web site. Next, of course, you should take a look at Quesa itself, and download the libraries or source code. There is an active Quesa mailing list, which you'll want to subscribe to, as Quesa is still evolving and there are sure to be discussions of current problems and future directions. You might also want an overview of how QD-3D and OpenGL compare, so that you can make an informed choice about which approach you want to take. You can start by checking out an article "Must-See 3-D Engines" from BYTE Magazine, which compares OpenGL, QD-3D, and Direct3D, and then take a look at the information and resources in a past MacTech Online column from March 1998, written by my predecessor. Both of these are somewhat old and may no longer be accurate in their details, but they'll give you a feel for how the APIs differ in their approaches as well as their consequent strengths and weaknesses. Also, there is an FAQ, as well as several link lists which you can consult to find further information.

OpenGL Resources

OpenGL itself is an open standard, and the hub of information about this library is at the OpenGL home page. Here you'll find an overview for developers, links to tutorials, and information about the large assortment of books available on OpenGL (including the reference standards The OpenGL Programming Guide: The Official Guide to Learning OpenGL and OpenGL Reference Manual). As I mentioned above, OpenGL has a large API with a significant learning curve, but it is probably worth the effort if you plan to do hard-core 3D. To make your job a little easier, read up on GLUT, the OpenGL Utility Toolkit. It's a simplified, window-based API which is geared toward those learning OpenGL or using it to writer smaller programs. (GLUT does ship with Apple's OpenGL implementation, by the way.) You can find links to additional resources at the site of the Mesa project, which is an independent library with an OpenGL-compatible API. If you just want to get a flavor for the OpenGL API, try out a recent article on the O'Reilly Network which describes how to use OpenGL to simulate a black hole (really), and also links to additional introductory articles. Finally, keep an eye on Apple's sample code pages for examples of using OpenGL from Cocoa and Carbon, and download the SDK to get you started.

3D Graphics Foundations

Before you dive into a particular API, you may want to get a feel for the field of 3D graphics in general. If you've never worked with it before, there's quite a bit of conceptual background you'll need, and if you plan to work with it extensively there is also quite a bit of math. The classic text is Computer Graphics : Principles And Practice by Foley, Feiner, and Van Dam (ISBN 0201848406), and it is thorough and dense, covering both 2D and 3D graphics. For some lighter reading try the two book's by Jim Blinn, Jim Blinn's Corner: A Trip Down the Graphics Pipeline (ISBN: 1558603875) and Jim Blinn's Corner: Dirty Pixels (ISBN: 1558604553). They're not a full curriculum but they will give you a feel for some of the interesting and often intricate parts of the field.

3D and Cocoa

Another "interesting" facet of the move to OpenGL for Mac OS X is that we seem to be without a Cocoa-based API for 3D graphics. Certainly, you can use OpenGL from within Cocoa applications—Objective-C was designed to be an extension to ANSI C, so there is no technological barrier to using a C-based API from within a Cocoa application, but it would be more convenient to have a fully object-oriented API to work with, and developers are likely to create their own object-based wrappers for the parts of the API they are using. It would be nice for someone to do this once and for all, and develop a higher-level Cocoa-based library that everyone could use. There is some hope for such an animal as part of the MiscKit project. The MiscKit is a collection of Cocoa-based classes and utilities, assembled under an open-source model before "open source" became a household term. There are all kinds of useful tidbits in the MiscKit, although they are still in the process of being updated for the current Cocoa libraries (as most of the Kit was developed for NEXTStep or OpenStep). Of immediate relevance is something called the 3DKit, which was originally developed by NeXT and later transferred to the MiscKit maintainers (it remains a logically separate project). There appear to be a few licensing issues which may need to be worked out, but with a little luck this could serve as a strong starting point for a high-level 3D framework for Cocoa, or at least as an API model for such a framework.

Moving Forward

With OpenGL as a first-class citizen on the Macintosh platform, developers have a real choice of solutions for 3D graphics. It isn't a direct result of the open-sourcing of the core of Mac OS X as Darwin, but open-source projects are becoming more and more relevant (and more an more important) to the platform, and are signaling a cultural shift in the Macintosh community as well as the programming community at large. The Macintosh platform is becoming less and less proprietary, and Macintosh developers are becoming more aware of valuable resources which originated on other platforms, and of their own ability to take part in the process of moving these technologies to the Macintosh. And although it's easy to overlook at first, this is completely in line with the original motivation for the Macintosh, and for Apple as a company: bringing the power of technology to the individual, and letting him make his own choices. Now, more than ever, this means giving this power and choice to the individual developer, as well as to the end user. It's our responsibility to take advantage of this freedom, and participate in driving the platform forward.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Pinegrow 6.23 - Mockup and design web pa...
Pinegrow (was Pinegrow Web Designer) is desktop app that lets you mockup and design webpages faster with multi-page editing, CSS and LESS styling, and smart components for Bootstrap, Foundation,... Read more
WhatsApp 2.2149.4 - Desktop client for W...
WhatsApp is the desktop client for WhatsApp Messenger, a cross-platform mobile messaging app which allows you to exchange messages without having to pay for SMS. WhatsApp Messenger is available for... Read more
Microsoft Remote Desktop 10.7.4 - Connec...
Microsoft Remote Desktop for Mac is an application that allows connecting to virtual apps or another PC remotely. Discover the power of Windows with Remote Desktop designed to help you manage your... Read more
ffWorks 2.6.7 - Convert multimedia files...
ffWorks, focused on simplicity, brings a fresh approach to the use of FFmpeg, allowing you to create ultra-high-quality movies without the need to write a single line of code on the command-line.... Read more
Opera 82.0.4227.58 - High-performance We...
Opera is a fast and secure browser trusted by millions of users. With the intuitive interface, Speed Dial and visual bookmarks for organizing favorite sites, news feature with fresh, relevant content... Read more
Day One 6.15 - Maintain a daily journal.
Day One is an easy, great-looking way to use a journal / diary / text-logging application. Day One is well designed and extremely focused to encourage you to write more through quick Menu Bar entry,... Read more
Default Folder X 5.6.3 - Enhances Open a...
Default Folder X attaches a toolbar to the right side of the Open and Save dialogs in any OS X-native application. The toolbar gives you fast access to various folders and commands. You just click on... Read more
OmniOutliner Pro 5.9.2 - Pro version of...
OmniOutliner Pro is a flexible program for creating, collecting, and organizing information. Give your creativity a kick start by using an application that's actually designed to help you think. It's... Read more
OmniOutliner Essentials 5.9.2 - Organize...
OmniOutliner Essentials (was OmniOutliner) is a flexible program for creating, collecting, and organizing information. Give your creativity a kick start by using an application that's actually... Read more
QuickBooks 19.0.11.984 - Financial manag...
QuickBooks helps you manage your business easily and efficiently. Organize your finances all in one place, track money going in and out of your business, and spot areas where you can save. Built for... Read more

Latest Forum Discussions

See All

The Best Wordle Clone in Town – The Touc...
In this week’s episode of The TouchArcade Show we dig into the drama of the moment which is the cloning and subsequent gloating about the cloning of the lovely little free word game Wordle. This leads into some additional drama about how PUGB Mobile... | Read more »
TouchArcade Game of the Week: ‘Cards Inf...
There’s nothing I love more than a perfect mobile game. What do I mean by that? Well, no game is actually perfect, but there’s something special about a game you know you can just whip out at a moment’s notice and dive into, and you know it will... | Read more »
‘Micro RPG’ Bringing Streamlined RPG Goo...
Originally announced on our forums more than 3 years ago, Micro RPG is an upcoming mobile game from a two-person studio that goes by the name JoliYeti Games and, as the title implies, it looks to offer all the fun of an RPG but in a more condensed... | Read more »
SwitchArcade Round-Up: ‘Kensei: The Seco...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for January 14th, 2022. Yesterday was a big day, but today shows that we’re still warming up the engines for this year. There are a handful of new releases, but nothing nearly as... | Read more »
Mobile MMORPG Shooter ‘Avatar: Reckoning...
Archosaur Games, Tencent, Lightstorm Entertainment, and Disney have just revealed a mobile MMORPG shooter Avatar: Reckoning. Avatar: Reckoning will be published by Level Infinite when it hits iOS and Android. It is an official Avatar game developed... | Read more »
‘Crashlands+’ Is Out Now on Apple Arcade...
The brilliant Crashlands from Butterscotch Shenanigans was confirmed to arrive on Apple Arcade as an App Store Great in the form of Crashlands+ () a little while ago and it has just released worldwide. If it isn’t live yet, it should roll out in... | Read more »
SwitchArcade Round-Up: ‘Eschatos’, ‘To B...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for January 13th, 2022. It’s a Thursday, and we’ve got a pretty hefty bag of new releases to dig into. There are always some fun surprises, and this week that came in the form of SNK Vs... | Read more »
‘Crush the Castle Legacy Collection’ Lau...
Ever since Angry Birds broke into the mainstream and became a household name more than a decade ago, there’s always been a small niche of people on the sidelines who would pipe up to remind everybody that “Crush the Castle did it first!" Indeed, the... | Read more »
Non-Violent Stealth Game ‘El Hijo – A Wi...
Over a year ago, Handy Games brought the non-violent stealth game El Hijo – A Wild West Tale to Switch, PS4, Xbox, PC, and Stadia. El Hijo – A Wild West Tale has been developed by Honig Studios and Quantumfrog. You play as El Hijo, a six year old,... | Read more »
‘ZED BLADE’ from SNK and Hamster Is Out...
After a bit of a break likely due to the holiday season, we’ve gotten a new title in the ACA NeoGeo series on iOS and Android. SNK and Hamster originally brought the series to mobile with Samurai Shodown IV, Alpha Mission II, and Metal Slug 5.... | Read more »

Price Scanner via MacPrices.net

Get an Apple Watch Series 7 for $50 off MSRP,...
Amazon has Apple Watch Series 7 models on sale for $50 off MSRP including free shipping. Their prices are the lowest available for Apple Watch Series 7 models today: – 41mm Apple Watch Series 7 GPS... Read more
Here are the details of Apple’s 2022 Educatio...
Need a new Apple Mac or iPad for school? Whether you’re a student, teacher, or staff member, you can use your .edu email address when ordering at Apple Education to take up to $400 off the price of a... Read more
Amazon is blowing out 2020 21″ iMacs for only...
Amazon has clearance 2020 21″ iMacs (2.3GHz Dual-Core i5, 8GB RAM, 256GB SSD) on sale right now for $599.99 including free shipping. Original MSRP for this model was $1099. Amazon expects delivery in... Read more
Find the best deal on an Apple MacBook using...
In the market for a new 13″ MacBook Air, 13″ MacBook Pro, 14″ MacBook Pro, or 16″ MacBook Pro with M1, M1 Pro, or M1 Max Apple Silicon? Use our Apple award-winning and exclusive price trackers to... Read more
Red Pocket Mobile is offering the Apple iPhon...
Switch to Red Pocket Mobile and get an Apple iPhone 13 Pro for $50 off MSRP, plus get free 6 months of Unlimited nationwide 5G service with the purchase of any iPhone 13. Red Pocket Mobile is a... Read more
24″ M1 iMacs on sale for $1249, $50 off Apple...
Amazon has base 24″ M1 iMacs (8-Core CPU/7-Core GPU/8GB RAM/256GB SSD) on sale today for $1249 shipped. Their price is $50 off Apple’s MSRP, and it’s the lowest price available for a new 24″ M1 iMac... Read more
Open-Box 16″ M1 Pro MacBook Pros available fo...
QuickShip Electronics has open-box return 16″ M1 Pro MacBook Pros in stock and on sale for $200-$300 off MSRP on their eBay store right now with free express delivery. According to QuickShip, “The... Read more
Stock Alert! Order a new 16″ M1 Pro MacBook P...
New 16″ MacBook Pros with Apple’s M1 Pro and M1 Max CPUs have been very hard to find, largely due to current global supply constraints. However, B&H Photo is reporting stock of Space Gray... Read more
Apple has maxed-out 13″ M1 MacBook Airs (16GB...
Save $250 on maxed-out 13″ M1 MacBook Airs today at Apple (16GB RAM/1TB SSD) with Certified Refurbished models available for $1399 in Space Gray and Gold colors. Regular price for this configuration... Read more
New promo at Xfinity Mobile: $400 off any App...
Xfinity Mobile is offering any new Apple iPhone for $400 off MSRP for new customers. This includes the iPhone 13. Price for the phone, including the discount, is spread monthly over a 24 month term... Read more

Jobs Board

Registered Nurse (RN) Employee Health PSJH -...
…is calling for a Registered Nurse (RN) Employee Health PSJH to our location in Apple Valley, CA.** We are seeking a Registered Nurse (RN) Employee Health PSJH to be Read more
Systems Administrator - Pearson (United State...
…and troubleshoot Windows operating systems (workstation and server), laptop computers, Apple iPads, Chromebooks and printers** + **Administer and troubleshoot all Read more
IT Assistant Level 1- IT Desktop Support Anal...
…providing tier-1 or better IT help desk support in a large Windows and Apple environment * Experience using IT Service Desk Management Software * Knowledge of IT Read more
Human Resources Business Partner PSJH - Provi...
…**is calling a** **Human Resources Business Partner, PSJH** **to our location in Apple Valley, CA.** **Applicants that meet qualifications will receive a text with Read more
Manager Community Health Investment Programs...
…is calling a Manager Community Health Investment Programs PSJH to our location in Apple Valley, CA.** **Qualified candidates will be invited to do a self-paced video Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.