Mar 98 MacTech Online
Volume Number: 14 (1998)
Issue Number: 3
Column Tag: MacTech Online
by Nicholas C. "nick.c" DeMello, firstname.lastname@example.org
With the coming of Rhapsody, Macintosh platform developers are going to have a wealth of powerful new tools at our disposal, including tools that will allow us to display spectacular and interactive 3D graphics. Two 3D graphics technologies vying for the center stage in Rhapsody are OpenGL and QuickDraw 3D.
Although Apple hasn't announced a decision at the time this column went to press, Rhapsody will likely support OpenGL. Originally developed as the graphics library for Silicon Graphics Iris systems in 1992, OpenGL has since evolved into the most widely accepted cross platform graphics API. It offers low level routines for defining, manipulating, and rendering 2D and 3D objects independent of the user interface. Especially popular with CAD programmers and the de facto standard for scientific and engineering applications, OpenGL has remarkably fast drawing routines (largely because most implementations of OpenGL interface directly with hardware). The API includes functions for easily scaling, translating, and rotating 3D objects, while offering control of polygon shading, depth cueing, and atmospheric effects in the rendering of those objects to a 2D representation. To learn more about OpenGL, visit the OpenGL information center. The information center reports the latest OpenGL news and hosts a collection of resources (including one page with links to over dozen FAQ's on various aspects of OpenGL programming).
The first Mac OS implementation of OpenGL was developed by Conix Graphics, and their web site displays a half dozen impressive demonstration models. Conix OpenGL offers royalty free distribution with your product and will run under Mac OS 7 -- which means you can start developing and distributing OpenGL products immediately. Folks looking into Java should also check out Magician (an OpenGL implementation for Java) by Arcane Technologies.
With half a decade of development, OpenGL represents a mature API that is well supported by a wealth of example code, a large base of developers (so many, they started their own newsgroup :-), and extensive documentation (including an online reference at HP's website). If your application requires fast drawing or 3D representation, you should take a closer look at what OpenGL offers.
- OpenGL Information Center, Hosting the OpenGL FAQ Index
- OpenGL for the Macintosh, by Conix Graphics
- Magician: OpenGL for Java
- Some Example Code for OpenGL
- The OpenGL Newsgroup
- OpenGL 1.1 Reference Online
In the Summer of 1995, Apple introduced it's own cross-platform graphics API -- QuickDraw 3D. The strengths of QuickDraw 3D are common Apple themes -- it's easy to use, the graphics are spectacular, and the technology is plug & play. While Rhapsody is likely to support OpenGL, QuickDraw 3D will certainly be there as well. Apple is not likely to abandon either this promising technology or the developers who have invested in it.
QuickDraw 3D may be less a competitor to OpenGL than a complement to it. A higher level API than OpenGL, QuickDraw 3D is fully object oriented and supports complex geometries like non-uniform rational B-spline (NURB) curves. Other high level features of the QD3D layer, include a portable data format (the 3D metafile), and an interactive renderer make it easier to work with than OpenGL. To get started with QuickDraw 3D you'll want to download the SDK from Apple's QuickDraw 3D site. While example QD3D code can be hard to come by, Brian Greenstone of Pangea Software has made the source code for his OreoAnimator available -- make sure to download a copy. Also, consider joining the QuickDraw 3D mailing list.
QuickDraw 3D resides on a hardware abstraction layer called the QuickDraw 3D Acceleration Layer. The interface to this layer is called RAVE (Render Acceleration Virtual Engine) and can be accessed either directly from your application or by QuickDraw 3D. Hardware acceleration or software enhancements can be added to QuickDraw 3D by registering either with RAVE. For example, LightWork Design has developed five plug-ins for QuickDraw 3D that offer advanced ray tracing features including ray cast shadows, radiosity, glass like reflectance, transparency, and ambient lighting. With the LightWork plug-ins your QuickDraw 3D applications can generate spectacular photo-realistic images. To find out more about the QuickDraw 3D Acceleration Layer see Apple's QuickDraw 3D RAVE pages.
- Apple's QuickDraw 3D Site (including the SDK)
- OreoAnimator Source Code, Provided by Pangea Software
- To Sign Up for the QD3D Mailing List
- LightWork Plugins, Enhanced Rendering for QD3D
- QuickDraw 3D Rave and the QuickDraw 3D Acceleration Layer