develop-22 9506 June 1995
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
Image 1
develop The Apple Technical Journal Issue 22 June 1995 QuickDraw 3D: A New Dimension for Macintosh Graphics Copland: The Mac OS Moves Into the Future Creating PCI Device Drivers Custom Color Search Procedures The OpenDoc User Experience Futures: Don't Wait Forever $10.00 3DMetafile ( 0 7 Normal Label10> ) Label2: Container ( ViewHints ( ) Label3: ZBuffer ( ) Label1
The magazine cover shows a 3D rendered scene of a classical stone column, a golden terrain mesh, teal wireframe lines and a grid surface, with stacked disc-like shapes bearing code labels at the bottom, beside a white left column of teal and black headlines and an Apple logo at top right.
Reading notes: Code labels on the lower disc shapes are partly obscured and read in a curved, angled layout; exact spacing and the final 'Label1' fragment at the bottom edge are uncertain. The 'Issue 22 June 1995' line is split across styles; spacing is inferred from the image. The Apple logo has no text and is not transcribed. Product names list only the masthead title; no advertised products are visible.
- Printed product names
- develop
- Printed prices
- $10.00
- Printed dates
- Issue 22 June 1995 · June 1995 · 1995
- Languages
- English
PDF page 1
develop The Apple Technical Journal Issue 22 June 1995 QuickDraw 3D: A New Dimension for Macintosh Graphics Copland: The Mac OS Moves Into the Future Creating PCI Device Drivers Custom Color Search Procedures The OpenDoc User Experience Futures: Don't Wait Forever $10.00 3DMetafile ( 0 7 Normal Label10> ) Label2: Container ( ViewHints ( ) Label3: ZBuffer ( ) Label4
A magazine cover with a white left column of teal and black headlines over a 3D-rendered image of a marble-like column, a gold wavy shape, wireframe grids, and stacked layered discs labeled with code-like text on a blue-purple background.
Reading notes: Small code labels on the stacked discs at the bottom are partially cut off or angled and may be incomplete, e.g. 'Label4' at the bottom edge. The 'Container (' and 'ViewHints ( )' labels are angled and partly overlapping the artwork, so exact reading order is uncertain. The Apple logo and masthead are graphic elements; 'develop' is a stylized masthead.
- Printed product names
- develop
- Printed prices
- $10.00
- Printed dates
- June 1995 · Issue 22
- Languages
- English
PDF page 2
E D I T O R I A L S T A F F Editor-in-Cheek Caroline Rose Managing Editor Toni Moccia Technical Buckstopper Dave Johnson Bookmark CD Leader Alex Dosher Able Assistant Meredith Best Our Boss Greg Joswiak His Boss Dennis Matthews Review Board Pete “Luke” Alexander, Dave Radcliffe, Jim Reekes, Bryan K. “Beaker” Ressler, Larry Rosenstein, Andy Shebanow, Gregg Williams Contributing Editors Lorraine Anderson, Steve Chernicoff, Toni Haskell, Jody Larson, Cheryl Potter Indexer Marc Savage A R T & P R O D U C T I O N Production Manager Diane Wilcox Technical Illustration Deb Dennis, Shawn Morningstar, John Ryan Formatting Forbes Mill Press Photography Sharon Beals, Deb Dennis, Maggie Fishell Cover Illustration Graham Metcalfe of Metcalfe/Shuhert Design; modeled and rendered in Strata StudioPro Online Production Cassi Carpenter ISSN #1047-0735. © 1995 Apple Computer, Inc. All rights reserved. Apple, the Apple logo, APDA, AppleLink, AppleScript, AppleShare, AppleTalk, LaserWriter, Mac, MacApp, Macintosh, Macintosh Quadra, MacTCP, MPW, MultiFinder, Newton, PowerBook, QuickTime, and TrueType are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. AOCE, AppleScript, A/ROSE, Balloon Help, develop, Finder, NewtonMail, OpenDoc, Power Macintosh, PowerTalk, and QuickDraw are trademarks of Apple Computer, Inc. PostScript is a trademark of Adobe Systems Incorporated, which may be registered in certain jurisdictions. PowerPC is a trademark of International Business Machines Corporation, used under license therefrom. NuBus is a trademark of Texas Instruments. UNIX is a registered trademark of Novell, Inc. in the United States and other countries, licensed exclusively through X/Open Company, Ltd. All other trademarks are the property of their respective owners. T H I N G S T O K N O W develop, The Apple Technical Journal, a quarterly publication of Apple Computer’s Developer Press group, is published in March, June, September, and December. develop articles and code have been reviewed for robustness by Apple engineers. This issue’s CD. Subscription issues of develop are accompanied by the develop Bookmark CD. This CD contains a subset of the materials on the monthly Developer CD Series , available from APDA. Included on the CD are this issue and all back issues of develop along with the code that the articles describe. (The code is updated periodically, so always use the most recent CD.) The CD also contains Technical Notes, sample code, and other documentation and tools (these contents are subject to change). Items referred to as being on “this issue’s CD” are located on either the Bookmark CD or the Reference Library or Tool Chest edition of the Developer CD Series . The develop issues and code are also available in the Developer Services areas on AppleLink and eWorld and at ftp.info.apple.com. (Selected articles are on the World Wide Web at http://www.apple.com, also in the Developer Services area.) Macintosh Technical Notes. Where references to Macintosh Technical Notes in develop are followed by something like “(QT 4),” this indicates the category and number of the Note on this issue’s CD. (QT is the QuickTime category.) E-mail addresses. Most e-mail addresses mentioned in develop are AppleLink addresses; to convert one of these to an Internet address, append “@applelink.apple.com” to it. For example, DEVELOP on AppleLink becomes develop@applelink.apple.com on the Internet. Append “@eworld.com” to eWorld addresses, and append “@online.apple.com” to NewtonMail addresses. C O N T A C T I N G U S Feedback. Send editorial suggestions or comments to Caroline Rose at AppleLink CROSE, Internet crose@applelink.apple.com, or fax (408)974-6395. Send technical questions about develop to Dave Johnson at AppleLink JOHNSON.DK, Internet dkj@apple.com, CompuServe 75300,715, or fax (408)974-6395. Or write to Caroline or Dave at Apple Computer, Inc., 1 Infinite Loop, M/S 303-4DP, Cupertino, CA 95014. Article submissions. Ask for our Author’s Guidelines and a submission form at AppleLink DEVELOP, Internet develop@applelink.apple.com, or fax (408)974-6395. Or write to Caroline Rose at the above address. Subscriptions and back issues. You can subscribe to develop through APDA (see below) or use the subscription card in this issue. You can also order printed back issues. For subscription changes or queries or back issue orders, call 1-800-877-5548 in the U.S., (815)734-1116 outside the U.S. Or write AppleLink DEV.SUBS or Internet dev.subs@applelink.apple.com. Be sure to include your name, address, and account number as it appears on your mailing label in all correspondence related to your subscription. One-year U.S. subscription price is $30 for 4 issues of develop and the develop Bookmark CD; all other countries, $50 U.S. For Canadian orders, price includes GST (R100236199). Back issues are $13 each in the U.S., $20 all other countries. APDA. To order products from APDA or receive a catalog, call 1-800-282- 2732 in the U.S., 1-800-637-0029 in Canada, (716)871-6555 internationally, or (716)871-6511 for fax. Order electronically at AppleLink APDA, Internet apda@applelink.apple.com, CompuServe 76666,2405, or America Online APDAorder. Or write APDA, Apple Computer, Inc., P.O. Box 319, Buffalo, NY 14207-0319. Printed on recycled paper d e v e l o p
Reading notes: Transcript is intentionally empty because the exact extracted text is preserved separately; all other fields were filled only from the supplied copy. No clear standalone headline is present, so headline is null; the spaced-out 'd e v e l o p' wordmark at the end may be a logo rather than a headline. Dates are limited to the year 1995 in the copy; the months March, June, September, and December appear only as publication schedule text and were not listed as printed dates. Prices are listed as they appear in the copy, including the currency qualifier 'U.S.' on the $50 price. Product names are limited to publication and CD titles appearing in the copy; the Macintosh Technical Notes and trademark names were excluded as non-advertised references.
- Printed product names
- develop · develop Bookmark CD · Developer CD Series
- Printed prices
- $30 · $50 U.S. · $13 · $20
- Printed dates
- 1995
- Languages
- English
PDF page 3
A R T I C L E S 6 QuickDraw 3D: A New Dimension for Macintosh Graphics by Pablo Fernicola and Nick Thompson Introducing QuickDraw 3D, a powerful, flexible new 3D graphics package for the Power Macintosh. This article provides an architectural overview and shows how to support 3D data in your application. 29 Copland: The Mac OS Moves Into the Future by Tim Dierks Here’s a preview of the future of the Mac OS, detailing some of the major features and components and giving some suggestions about how to get ready for it now. 42 Creating PCI Device Drivers by Martin Minow All about the new driver model on PCI-based Macintosh computers, and advice on porting existing drivers. 66 Custom Color Search Procedures by Jim Wintermyre Learn about this useful method of customizing Color QuickDraw’s color handling. A real-world graphics problem is investigated and then solved using a custom color search procedure and a hash table. 83 The OpenDoc User Experience by Dave Curbow and Elizabeth Dykstra-Erickson This article provides an overview of OpenDoc from the user’s perspective: understanding the user experience is a prerequisite to designing good part editors. 98 Futures: Don’t Wait Forever by Greg Anderson Futures are an invaluable abstraction for applications that handle multiple asynchronous Apple events, allowing cleaner code and eliminating the need for completion routines. C O L U M N S 39 BALANCE OF POWER MacsBug for PowerPC by Dave Evans and Jim Murphy MacsBug changes with the times. 63 MPW TIPS AND TRICKS Building a Better (Development) Environment by Tim Maroney Some things to think about when you’re building a shared development environment. 81 ACCORDING TO SCRIPT Scripting Quandaries by Cal Simone Bits of wisdom and advice for developers supporting scripting in their applications. 94 THE VETERAN NEOPHYTE Paper Juggling by Dave Johnson You can invent multiperson juggling patterns even if you’re not a juggler. Really. 112 MACINTOSH Q & A Apple’s Developer Support Center answers questions about Macintosh product development. 121 NEWTON Q & A: ASK THE LLAMA Answers to Newton-related development questions, along with a bit of llama lore. Send in your own questions for a chance at a T-shirt. 124 KON AND BAL’S PUZZLE PAGE A Branch Too Far by Chris Yerga Yet another multifaceted mystery is unraveled before your very eyes, as guest puzzler Chris Yerga tries to stump the master. Issue 22 June 1995 CONTENTS 1 2 EDITOR’S NOTE 3 LETTERS 130 INDEX
Reading notes: Headline "A R T I C L E S" is a section label rather than a primary headline; may not be the intended headline.
- Printed product names
- QuickDraw 3D · Power Macintosh · Mac OS · Copland · PCI · Color QuickDraw · OpenDoc · MacsBug · PowerPC · MPW · Newton
- Printed dates
- June 1995
- Languages
- English
PDF page 4
EDITOR'S NOTE
This is a very forward-looking issue of develop . The cover article is on QuickDraw 3D, whose final release won’t have shipped by the time you read this (though it should be soon). We’ve also got articles on Copland and OpenDoc, which aren’t due for final release for a while yet. You’ll learn how Copland will take the Mac OS into the future and how OpenDoc will affect the way users work with documents. There’s an article on creating PCI device drivers that will be — as far as we can tell as of this writing — forward compatible with Copland. And we’ve got an article on the very subject of futures, a convenient way of implementing asynchronous interapplication communication, which will be especially valuable as more applications become scriptable and as component-oriented systems like OpenDoc become more prevalent. All in all, we’re looking ahead . Having articles on technology that hasn’t shipped yet makes it tough for us to give you solid information and code that we know will withstand the test of time and not change in the future. QuickDraw 3D is shipping soon enough that we know that article and its code are reasonably solid — but the software is “beta” as of this writing, so changes can still happen. The Copland and OpenDoc articles provide only background information that should prove helpful as you consider how to use those technologies in your work; these articles provide no code, but only a context for the respective technologies. And although the PCI article does its best to tell you what may or may not work with Copland, there are limits to how far it can see into the future. While it’s certainly atypical to have develop articles that aren’t based on good, solid code, we felt these articles would nonetheless be of interest to you. We’d really like to know whether you agree with our decision. Our Review Board meetings are driven by what we think you want; we periodically need a reality check from you. There’s yet another way that we’re giving you a glimpse into the future: this issue’s CD contains a Preliminary Drafts folder containing articles that we expect to publish in a future issue of develop . Again, we didn’t want to keep you from getting information that you might find useful. This time we’ve got an article on implementing multipane dialogs and another on performing timing operations. Look in this folder from now on for “extra” articles. So please, take a moment to give us your feedback on all of this (see the inside front cover to find out how to contact us). Why not stop by for a chat if you’re at this year’s Worldwide Developers Conference? Help us help you do a better job; that’s why we’re here. Looking forward to hearing from you, CAROLINE ROSE d e v e l o p Issue 22 June 1995 2 EDITOR’S NOTE CAROLINE ROSE (AppleLink CROSE) has been writing and editing for so long that she can do it in her sleep. In fact, she sometimes lies awake at night trying to solve writing problems — as she used to do for code bugs back when she was a programmer. To help get her mind off work, Caroline does Tai Chi and Ch’i Kung and curls up with her longtime feline companion, Cleo. But even then she can’t get away from playing with words, as she continually adds to the long list of Cleo’s nicknames; current favorites include Fuzz Bucket and The Purrmeister. Caroline agrees with Albert Schweitzer that there are two means of refuge from the miseries of life: music and cats.• Caroline Rose Editor
Reading notes: Possible reading-order ambiguity between the main editorial text and the Editor's Note sidebar
- Printed product names
- QuickDraw 3D · Copland · OpenDoc · develop
- Printed dates
- June 1995
- Languages
- English
PDF page 5
MORE ON HIDING DIALOG ITEMS In develop Issue 20, I came across the Q&A (at the bottom of page 107) that recommends using AppendDITL and ShortenDITL to add or remove many dialog items at once rather than using ShowDItem and HideDItem on each item individually. I agree with what’s said; however, there’s an issue with using AppendDITL that I encountered recently and confirmed with Developer Support. I’ve been involved in writing an application that uses 'ictb' resources to define the font for each dialog item. This is necessary for our application to allow globalization. When AppendDITL is called to append items to the dialog, the associated 'ictb' resource for the appended DITL resource isn’t loaded. 'ictb' resources are loaded only when NewDialog is called. As a result, AppendDITL can’t be used in this case; the show/hide items mechanism must be used instead. I find develop informative; keep up the good work. — Niall Quiggin Ah, the inevitable exception to the rule. Thanks for pointing it out. — Dave Johnson PUZZLE PAGE ERROR: OPENRF The solution for the Puzzle Page in develop Issue 20 is wrong. It says that the Finder should use OpenRF instead of OpenResFile. OpenRF allows the resource fork to be accessed only as a data stream, and so is useful only if the code wants to copy the entire resource fork without examining its contents. To look at bundles and icons and such, a routine such as HOpenResFile must be used — which is, in fact, what the Finder calls. The cause of the bug isn’t that the Finder uses fsRdWrPerm, but that it uses fsCurPerm. Inside Macintosh: More Macintosh Toolbox implies that fsCurPerm will work fine if the file is open for writing by someone else, and that read permission to the file will be granted in that case. But unfortunately, fsCurPerm will fail, just like fsRdWrPerm, if the file is already open for writing. To guarantee access to the resource fork of the file, fsRdPerm must be used instead of fsCurPerm. This change was made to the Finder in system software version 7.5.1. Still, you can’t blame Shelley and Byron for getting the wrong answer; they’re just dogs, and most dogs don’t have access to Finder sources. — Greg Anderson, Apple Computer I conferred with my dogs and they apologized profusely for assuming the inner workings of the Finder that they indeed did not understand. Thanks for the correction. — Cary Clark PUZZLE PAGE STINKS Has it ever occurred to you how small must be the audience to which your regular contributors KON & BAL are playing? Their Puzzle Page is elitist and intellectually arrogant. Who do you imagine would be privy to the Apple- Eyes-Only knowledge necessary to solve some of these puzzles? LETTERS LETTERS 3 WHAT DO YOU THINK OF THE PUZZLE PAGE or the rest of develop, for that matter? We welcome timely letters to the editors, especially regarding articles published in develop. Letters should be addressed to Caroline Rose — or, if technical develop-related questions, to Dave Johnson — at AppleLink CROSE or JOHNSON.DK. Or you can write to Caroline or Dave at Apple Computer, Inc., 1 Infinite Loop, M/S 303-4DP, Cupertino, CA 95014. All letters should include your name and company name as well as your address and phone number. Letters may be excerpted or edited for clarity (or to make them say what we wish they did).•
Reading notes: Possible OCR spacing artifacts in 'AppleLink CROSE or JOHNSON.DK' and 'M/S 303-4DP' ; section reading order mixes multiple letters and puzzle page items.
- Printed product names
- develop · Inside Macintosh: More Macintosh Toolbox · AppleLink · Apple Computer, Inc.
- Printed dates
- Issue 20 · 7.5.1
- Languages
- English
PDF page 6
As you progress further and further into their morass of micro-minutiae, they indicate that you’re less and less clever due to your ever-reducing “score.” The whole concept is punitive, pedantic, and boorish. And those invectives at the end of the article continue the process of belittling the reader with the suggestion that, due to your incredibly low score, “Maybe you’d better stick to AppleScript.” Ouch! As it happens, AppleScript is an incredibly powerful technology that helps to differentiate the Mac OS from being just another pretty interface. Their attempt at being humorous isn’t lost on me, but it failed nonetheless. Those guys are certainly smart and Apple needs to have people like that on the payroll. But the average fellow in Kansas with a subscription to develop who has adopted Apple as his computing beacon is mocked by such articles and to no real good end. The Puzzle Page is wasted on all but the most inner circle of monks in the Apple sanctum sanctorum. — Lance Drake Your letter was surprising, since we get a lot of good feedback on the Puzzle Page. The puzzle format is just for fun (heh heh). The idea is that you learn something from the debugging techniques. Probably no one ever scores above 0, but that’s not really the point. If you haven’t already, you might want to take a look at the two letters in Issue 20 on the subject of the Puzzle Page. Humor is a tricky thing: what some people find hilarious, others find repugnant. I’m sorry the Puzzle Page doesn’t work for you. I certainly don’t want any of our readers to feel mocked; maybe our publishing this letter will stimulate some dialog on this. Regarding your specific comment about AppleScript: we couldn’t agree more. We hope you’ll be pleased with our new regular column, According to Script. By the way, Apple does indeed need smart people like KON & BAL on the payroll, but they don’t work for Apple anymore. Thanks for writing. — Caroline Rose UNTIDY CODE (GIVE US A BREAK) Greg Anderson’s article in Issue 20 of develop , in the listing on page 67, gave me a probably unintentional insight into the deeper workings of Apple code. Apparently, constructions like this while (true) { do something if (somethingelse) break; } are acceptable at Apple nowadays. Surely there must be a better, less sloppy and lazy way to do this. (Please don’t ask me what’s wrong with it; that would force me to go and buy Windoze machines next.) — Joost Carpay You’re right; the use of a break statement in conjunction with while (true) is generally considered poor style. Good style would be: condition = true; while (condition) condition = DoSomething(); While code that appears in develop should of course use good style, the develop staff tells me that they are loath to enforce particular rules; they can, however, make suggestions, and will keep an eye out for this construct in the future. Apple’s guidelines for software development recommend against using breaks inside loops and also against using do / while in place of a simple while loop. The ultimate metric used to judge code should be the clarity of the intent of the algorithm in question. Using good and consistent style certainly improves the readability of code, but I would hope that small infractions of style would be forgiven if the intent of the code remains clear. Code quality is important to Apple, and we’re always working at improving the process used to produce system software. — Greg Anderson d e v e l o p Issue 22 June 1995 4
Reading notes: Possible reading-order ambiguity where the letter from Lance Drake is followed by Caroline Rose's reply and the Joost Carpay letter headline appears mid-text Stray spacing in the printed source around the word develop and code listings may affect exact reproduction
- Printed product names
- AppleScript · Mac OS · develop · Windoze · According to Script
- Printed dates
- June 1995
- Languages
- English
PDF page 7
I Indispens ndispensa able ble T To oo ol ls s o of the f the T Tr ra ad de e JUST RELEASED! Macintosh Programmer’s Toolbox Assistant by Apple Computer, Inc., provides instant access to essential information for more than 5,000 toolbox calls that are at the heart of the Mac™ OS. Directly accessible from most of the popular develop- ment environments, this CD-ROM has been carefully designed to help you reduce the time it takes to develop your applications. With abundant hypertext links and the ability to copy and paste routine templates and sample code, Macintosh Programmer’s Toolbox Assistant is the productivity tool for programmers. ISBN 0-201-48342-4 JUST RELEASED! Apple Guide Complete: Designing and Developing Onscreen Assistance by Apple Computer, Inc., is the offi- cial, complete kit for producing interactive tutorials with System 7.5. The book demonstrates how to develop a wide range of onscreen help systems that streamline every- thing from task-oriented procedures to quick tips and reference mate- rial. The accompanying CD con- tains the Apple Guide authoring software and will help instructional designers, scripters, and program- mers really get the most out of this powerful help system. ISBN 0-201-48334-3 Inside Macintosh CD-ROM has already become an invaluable ref- erence for thousands of program- mers since its publication just this past October. The CD-ROM con- tains more than 16,000 pages of the complete text from 26 volumes of Inside Macintosh library — the definitive reference for anyone writ- ing software for Macintosh com- puters plus the text of Macintosh Human Interface Guidelines . No Macintosh programmer should be without this ultimate electronic resource. ISBN 0-201-40674-8 Addison-Wesley Publishing Company Available at fine technical bookstores in your area, or call 1-800-822-6339 for U.S. orders and 1-800-447-2226 for International orders. Inside Macintosh CD-ROM Apple Guide Complete Macintosh Programmer’s Toolbox Assistant
Reading notes: Headline OCR appears letter-spaced and fragmented; reconstructed as 'Indispensable Tools of the Trade'.
- Printed product names
- Macintosh Programmer’s Toolbox Assistant · Apple Guide Complete: Designing and Developing Onscreen Assistance · Inside Macintosh CD-ROM · Macintosh Human Interface Guidelines
- Languages
- English
PDF page 8
QuickDraw 3D: A New Dimension for Macintosh Graphics
QuickDraw 3D is a new technology that helps developers bring 3D capabilities to their applications. It runs on all Power Macintosh computers and offers high-performance 3D rendering and other features that make working with 3D data easier. This article gives the basics you’ll need to use QuickDraw 3D in your application, whether you’re a consummate 3D developer, a classic 2D application developer, or a game developer. QuickDraw 3D is the newest enhancement to the Macintosh graphics architecture. Developers have been requesting a 3D library, supported at the system level, since the Macintosh was introduced. Although a number of Macintosh developers have produced some amazing 3D applications, 3D graphics capabilities were relegated to niche applications due to the lack of support at the core operating system level. QuickDraw 3D, which is expected to ship in mid-1995, brings the ability to deal with 3D graphics to all Power Macintosh applications: not only can traditional 3D applications take advantage of it, but it provides base functionality for general- purpose applications as well. QuickDraw 3D is a Code Fragment Manager–based shared library, with a C-based API. Here we’ll cover some concepts you need to know to get basic QuickDraw 3D support into your application. This issue’s CD contains a prerelease version of the QuickDraw 3D shared library, the 3D Viewer shared library, programming interfaces, preliminary Inside Macintosh: QuickDraw 3D documentation, sample code, utility libraries, and other goodies. Two of the sample programs are discussed in this article. The API described in the article is based on a beta version of QuickDraw 3D; although nearly final, the API may change before the final release of the software.• In addition, we’ll talk about reading and writing data in QuickDraw 3D metafile format, which is a way of representing 3D data in a consistent, transferable manner. But first we’ll set the stage with some background information. PABLO FERNICOLA AND NICK THOMPSON QuickDraw 3D: A New Dimension for Macintosh Graphics d e v e l o p Issue 22 June 1995 6 PABLO FERNICOLA (AppleLink PFF, eWorld EscherDude) After spending many years working in 3D graphics under operating systems named **IX, in a faraway land called Alabama, Pablo made the transition to real computers. After moving to Silicon Valley, he learned to beat the traffic jams by getting to work before 8 A.M. and going home after 10 P.M. Now he can be found staring out the window and wondering how he’s going to get home on Interstate 280 after the next earthquake.• NICK THOMPSON (AppleLink NICKT) is currently establishing himself as the Mountain Dew–guzzling fat fool of Developer Technical Support. Unable to work the winter blubber off due to killer waves that are preventing him from surfing on the California coast, Nick has been consoling himself with learning the wonder that is QuickDraw 3D. He was last seen wandering down one of the corridors at Apple mumbling to himself.•
Reading notes: Author bio contains informal text (e.g., 'Mountain Dew–guzzling fat fool'); reading order of author bios relative to article body may be ambiguous
- Printed product names
- QuickDraw 3D · Power Macintosh · Inside Macintosh: QuickDraw 3D · Macintosh · Code Fragment Manager
- Printed dates
- June 1995 · mid-1995 · Issue 22 · 1995
- Languages
- English
PDF page 9
QUICKDRAW 3D — SO, WHAT'S THE BIG DEAL?
QUICKDRAW 3D — SO, WHAT’S THE BIG DEAL? As we’ll explain further in this article, QuickDraw 3D provides developers with a number of benefits: • a rich set of high-level geometries • built-in renderers that cover the base functionality needed by developers • immediate and retained graphics • a common 3D file format • human interface guidelines and widgets • a 3D pointing-device manager that provides support for input devices with more than two degrees of freedom • pointing and picking support that enables user selection of 3D data • transparent access to graphics accelerators • an extensible, plug-in shading and rendering architecture • implementation advantages over other 3D libraries We’ve made dealing with 3D data in applications easier with QuickDraw 3D. By creating a standard for data interchange, with a well-rounded metafile definition, we’re enabling applications to read and write 3D data in a consistent format. The metafile specification addresses requests from both end users (who couldn’t exchange data between applications in a common format) and developers (who had to write special-case code to deal with several different file formats). QuickDraw 3D comes with a set of human interface guidelines to foster the adoption of a consistent look and feel between applications (see “The QuickDraw 3D Human Interface”). 3D applications today are geared toward the trained 3D expert; what you learn in one application is generally not transferable to another application. By following the QuickDraw 3D human interface guidelines, however, developers can help make 3D graphics an integral part of the user experience within their applications. QuickDraw 3D technology has been made possible in part by the dramatic performance improvements in the Power Macintosh line of computers. The performance of QuickDraw 3D is scalable across the Power Macintosh line; we’ve put in a lot of effort to ensure that the performance on even entry-level computers is excellent. With hardware acceleration, these computers can easily compete (and win) against mid-range workstations costing a lot more money. HOW QUICKDRAW 3D COMPARES WITH OTHER LIBRARIES QuickDraw 3D offers many advantages over other 3D libraries. When using other graphics libraries, you’re on your own if, for instance, you want to change the way a scene is rendered (say, by doing ray tracing or applying procedural shading): you have to reimplement all of the 3D architecture. With QuickDraw 3D, you only have to write code to deal with the specific area that you want to change. And, even better, the code you write can be used as a plug-in by other applications. Unlike some libraries, QuickDraw 3D will be able to take advantage of a number of 3D hardware acceleration solutions, since acceleration was one of its design criteria. Another important criterion was cross-platform support. For example, a renderer could be written to take advantage of low-level 3D libraries, such as the Silicon Graphics OpenGL graphics library. QUICKDRAW 3D: A NEW DIMENSION FOR MACINTOSH GRAPHICS 7
Reading notes: Page-number and running footer 'QUICKDRAW 3D: A NEW DIMENSION FOR MACINTOSH GRAPHICS 7' may be a header or footer rather than body text
- Printed product names
- QuickDraw 3D · Power Macintosh · OpenGL
- Languages
- English
PDF page 10
WHAT YOU CAN DO WITH QUICKDRAW 3D The 3D application development process can be broken down into four areas: creation of 3D data into a set of data structures, manipulation of that data in the human interface of the application, presentation of the data by displaying it, and transportation of the data (saving to and reading from files). QuickDraw 3D provides support in each of these areas. You can implement one or more of them in your application: • QuickDraw 3D geometries — If you’re planning to write an application to deal with the creation of models, QuickDraw 3D lets you define the representation of the objects to be modeled in 3D form. • QuickDraw 3D human interface — Maybe you want to allow users to visualize 3D data and models in a standalone application or as part of an existing application. QuickDraw 3D’s human interface guidelines and built-in widgets provide a consistent way of manipulating 3D objects. • QuickDraw 3D rendering and shading — Rendering turns the 3D geometries into pixels; shading determines what color those pixels should be. Realism can be added by applying textures to objects: texture mapping takes a texture (usually from a picture source, such as a picture of a brick wall) and wraps it around an object. For d e v e l o p Issue 22 June 1995 8 QuickDraw 3D provides human interface guidelines (in version 1.0) and a toolkit for implementing the guidelines (to come in the second major release). A sample application on this issue’s CD illustrates our current ideas for a 3D human interface. By getting a preview of our plans, you can start taking your applications along the common path. Our main goal is to provide integration into the Macintosh experience. We feel that 3D graphics will be the next popular multimedia data type — in the way that 2D graphics, sound, and movies have been in the past — and users will want to incorporate 3D data into their documents in the same way that they can now incorporate other multimedia data types. To do this they’ll need an interaction model built on the 2D principles that they’re familiar with. Our guidelines offer suggestions and examples of how things can be done. If your applications are targeted for a very specific audience, and you know that audience well, you may decide to communicate with them in a different way, and that’s perfectly OK. One of our guidelines, about direct manipulation through the use of a widget, is illustrated in Figure 1. Here we’ve appropriated the 2D grab handles that are popular in many “draw” programs and extended them to 3D. A widget is a set of handles for control of spatial parameters. Some widgets, such as the scale tool shown in Figure 1, indicate selection of a shape, while others make an invisible object, such as a light or a camera, visible. Figure 1. A scaling widget Figure 2 shows what a full-featured 3D application might look like. The emphasis here is on what’s the same as in 2D applications rather than on what’s unique. The illustration shows a shape selected with a rotation widget, a material selection palette, a room metaphor, and a document containing multiple views of a scene. THE QUICKDRAW 3D HUMAN INTERFACE BY DAN VENOLIA
Reading notes: Figure captions and page layout order may be imperfectly sequenced in the extracted copy.
- Printed product names
- QuickDraw 3D
- Printed dates
- June 1995 · Issue 22 · version 1.0
- Languages
- English
PDF page 11
example, Figure 3 shows a dinosaur mesh rendered with a skin texture picture as a texture map. In its second major release, QuickDraw 3D will enable you to write plug-in renderers and shaders and license them to other developers. The dinosaur model was supplied in QuickDraw 3D metafile format courtesy of Viewpoint DataLabs Intl.• • QuickDraw 3D metafile format — If you want to provide 3D clip art in the form of models, you’ll really be pleased with QuickDraw 3D’s metafile format. One of the common problems encountered by users when working with several 3D applications is that of data interchange, where one application’s file is not readable by another due to the multitude of 3D data formats. QuickDraw 3D addresses this problem by providing a standard for the interchange of 3D data. This device- and platform-independent representation of 3D data is extensible, so your custom data gets preserved. And all of the elements for a scene can be stored in the metafile, including lighting, camera objects, texture maps, and shaders. ROAD MAP FOR ADOPTION Based on our experience working with developers, we’ve created a road map for adoption of QuickDraw 3D. Here we’ll look at how different application developers might begin to adopt QuickDraw 3D, in order from the least to the greatest amount QUICKDRAW 3D: A NEW DIMENSION FOR MACINTOSH GRAPHICS 9 Figure 2. Conceptual sketch of a 3D application
Reading notes: Running page header and reading order between the body text fragments and the road map section may be non-sequential
- Printed product names
- QuickDraw 3D
- Languages
- English