Mar 98 MacTech Online
Volume Number: 14 (1998)
Issue Number: 3
Column Tag: MacTech Online
MacTech Online
by Nicholas C. "nick.c" DeMello, online@mactech.com
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.
OpenGL
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
- http://www.opengl.org/
- http://www.opengl.org/Developers/Documentation/devfaqlist.html
- OpenGL for the Macintosh, by Conix Graphics
- http://www.conix3d.com/
- Magician: OpenGL for Java
- http://www.arcana.co.uk/products/magician/
- Some Example Code for OpenGL
- http://trant.sgi.com/opengl/examples/examples.html
- The OpenGL Newsgroup
- news:comp.graphics.api.openGL
- OpenGL 1.1 Reference Online
- http://www.hp.com/wsg/products/grfx/OpenGL/Web/Reference.html
QuickDraw 3D
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)
- http://quickdraw3d.apple.com/
- OreoAnimator Source Code, Provided by Pangea Software
- http://www.realtime.net/~pangea/
- To Sign Up for the QD3D Mailing List
- quickdraw-3d-request@devtools.apple.com
- LightWork Plugins, Enhanced Rendering for QD3D
- http://www.lightwork.com/qd3d/
- QuickDraw 3D Rave and the QuickDraw 3D Acceleration Layer
- http://devworld.apple.com/dev/techsupport/insidemac/