home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / Windows / readme.txt < prev   
Encoding:
Text File  |  1996-05-02  |  10.4 KB  |  184 lines  |  [TEXT/MSWD]

  1.  
  2.  
  3. QuickDraw 3Dô 1.1 WWDC DR - Win32 Platform Preliminary Developers' Release 
  4.  
  5.  
  6. Preliminary Release Notes - May 2, 1996
  7.  
  8. This special release includes only the debug build of QuickDraw 3D for Win32. The release version DLLs will be included in a future developers' release. Since this is a debugging, development build it does not represent the type of performance you can expect in an optimized, non-debugging release. 
  9.  
  10. This is a preliminary development release. It is intended for evaluation purposes only. No part of this release may be redistributed without permission from Apple Computer. 
  11.  
  12. Welcome to QuickDraw 3D!  
  13.  
  14. QuickDraw 3D is a platform independent 3D graphics library developed by Apple Computer.  Enclosed, you will find the 1.1 WWDC DR release of QuickDraw 3D for Win32.
  15.  
  16. QuickDraw 3D goes beyond providing 3D graphics, it provides an integrated solution both for the end user and for developers.  QuickDraw 3D encompasses a standard file format (3DMF), acceleration layer, input architecture, high level geometries, and extensibility.
  17.  
  18. QuickDraw 3D is a library for PowerPCô based computers running the MacOS and Pentiumô based computers running Windows 95ô or Windows NTô 3.51.  The API is in C, with support for development using C++.  QuickDraw 3D allows for immediate mode and retained rendering.  The API is object based and provides a large number of geometry types.  The file format accommodates both text and binary modes, with encoding for endianess so that files can be transported to other platforms and across the Internet. 3DMF parser code for several different platforms is available from our Web page at http://www.info.apple.com/qd3d/.
  19.  
  20. QuickDraw 3D for Win32 System Requirements
  21. Pentium processor
  22. Windows 95 or Windows NT 3.51
  23. A video board providing 256 color (8-bit) at 640x480 resolution. High Color (16-bit) or True Color (24-bit or 32-bit) video highly recommended.
  24.  
  25. Development System Requirements
  26. Microsoft Visual C++ 4.0 or 4.1 
  27. MSVCR40D.DLL - the debug version of C runtime DLL which is included with Visual C++ 4.0 and 4.1
  28.  
  29. Functionality
  30. Pixmap Draw Context Only
  31. Only the pixmap draw context is supported in this developer release of the QuickDraw 3D. The implication of this is that your application will be responsible for blitting the draw context to the screen. See "Implementing Double Buffering Using Pixmap Draw Context and GDI" below.
  32.  
  33. A Win32 specific draw context will be fully supported in a forthcoming developer release.
  34.  
  35. The QuickDraw 3D Pointing Device Manager
  36. The QuickDraw 3D Pointing Device Manager API is not supported in the Win32 version of QuickDraw 3D.
  37.  
  38. Using this QuickDraw 3D Win32 Preliminary Developer Release
  39. Copy the contents of the QuickDraw 3D preliminary Win32 release to your hard drive.
  40. Set you Lib and Include paths to reference the QuickDraw 3D Lib directory and Interfaces directory respectively. (Under Visual C++ this can be done from the Tools|Options|Directories dialog panel.) 
  41. Set your Path to reference the QuickDraw 3D Lib directory where the QuickDraw 3D DLLs are located or copy these DLLs to your Windows\System folder (Win95) or Windows\System32 directory (NT).
  42.  
  43. Lib, Include and Path can be also be set using environment variables (in Autoexec.bat on Win95 or in the System control panel on NT).
  44. example: 
  45.    Set LIB = %LIB%;c:\QD3D\LIB
  46.    Set INCLUDE = %INCLUDE%;c:\QD3D\Interfaces
  47.    Set PATH = %Path%;c:\QD3D\LIB
  48.  
  49. Implementing Double Buffering Using Pixmap Draw Context and GDI
  50. QuickDraw 3D applications using this developer release must use the generic pixmap draw context. A native Win32 draw context will be fully supported in a future developer release.
  51.  
  52. The basic method for managing a pixmap draw context is demonstrated in the enclosed QD3DSample application project. It consists of two main steps: Creating a new draw context for a view and rendering.
  53.  
  54. Creating a draw context for a view:
  55. Create a memory device context compatible with the view window's DC and store a reference to it.
  56.     hdc = GetDC(theDocument->fWindow);
  57.     theDocument->fMemoryDC = CreateCompatibleDC(hdc);
  58.  
  59. Create an 16 or 32 bit device independent bitmap (DIB) and select it into the memory device context.
  60.     bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);    
  61.     bitmapInfo.bmiHeader.biWidth = theDocument->fWidth;    
  62.     bitmapInfo.bmiHeader.biHeight = -theDocument->fHeight; // note: negative for top-down DIB    
  63.     bitmapInfo.bmiHeader.biPlanes = 1;
  64.     if ( GetDeviceCaps(hdc, BITSPIXEL) == 32 )
  65.         bitmapInfo.bmiHeader.biBitCount = 32;
  66.     else
  67.         bitmapInfo.bmiHeader.biBitCount = 16;    
  68.     bitmapInfo.bmiHeader.biCompression = BI_RGB;    
  69.     bitmapInfo.bmiHeader.biSizeImage = 0;    
  70.     bitmapInfo.bmiHeader.biXPelsPerMeter = 0;    
  71.     bitmapInfo.bmiHeader.biYPelsPerMeter = 0;    
  72.     bitmapInfo.bmiHeader.biClrUsed = 0;    
  73.     bitmapInfo.bmiHeader.biClrImportant = 0;    
  74.     theDocument->fBitmap = CreateDIBSection(hdc, &bitmapInfo, DIB_RGB_COLORS,    
  75.         &theDocument->fBitStorage, NULL, 0);    
  76.     SelectObject(theDocument->fMemoryDC, theDocument->fBitmap);
  77.  
  78. Create a new pixmap draw context which is parametrized to match the DIB. Set the pixmap draw context's image data pointer to the DIB's bitmap data. The draw context's doubleBufferState flag should be false.
  79.     myDrawContextData.clearImageMethod = kQ3ClearMethodWithColor;
  80.     myDrawContextData.clearImageColor = ClearColor;
  81.     myDrawContextData.paneState = kQ3False;
  82.     myDrawContextData.maskState = kQ3False;
  83.     myDrawContextData.doubleBufferState = kQ3False; // the app is doing the double buffering
  84.         /* create a TQ3Pixmap */
  85.     aPixmap.width = theDocument->fWidth;
  86.     aPixmap.height = theDocument->fHeight;
  87.     aPixmap.image = theDocument->fBitStorage;  //fBitStorage is bitmap data from the DIB
  88.     if (bitmapInfo.bmiHeader.biBitCount == 32)
  89.     {
  90.         aPixmap.rowBytes = aPixmap.width * 4;
  91.         aPixmap.pixelSize = 32;
  92.         aPixmap.pixelType = kQ3PixelTypeRGB32;
  93.     }
  94.     else
  95.     {
  96.         aPixmap.rowBytes = (aPixmap.width * 
  97.             (bitmapInfo.bmiHeader.biBitCount/8));
  98.         aPixmap.rowBytes = (aPixmap.rowBytes + 3) & ~3L; // make it long aligned
  99.         aPixmap.pixelSize = 16;
  100.         aPixmap.pixelType = kQ3PixelTypeRGB16;
  101.     }
  102.     aPixmap.bitOrder = kQ3EndianLittle;  
  103.     aPixmap.byteOrder = kQ3EndianLittle; 
  104.         /* set up the pixmap draw context */
  105.     myPixmapDrawContextData.pixmap = aPixmap;
  106.     myPixmapDrawContextData.drawContextData = myDrawContextData;
  107.     myDrawContext = Q3PixmapDrawContext_New(&myPixmapDrawContextData);
  108.  
  109. Set the pixmap draw context as the draw context for the view and dispose of the draw context.
  110.     Q3View_SetDrawContext(myView, myDrawContext);
  111.     Q3Object_Dispose( myDrawContext );
  112.  
  113. Be sure to set the renderer associated with your view to use double buffer bypass. (Remember your application is performing the double buffering).
  114.     myRenderer = Q3Renderer_NewFromType(kQ3RendererTypeInteractive;
  115.     Q3View_SetRenderer(myView, myRenderer;
  116.     Q3InteractiveRenderer_SetDoubleBufferBypass( myRenderer, kQ3True);
  117.     Q3InteractiveRenderer_SetPreferences(myRenderer, kQAVendor_BestChoice, 0);
  118.  
  119. Rendering (typically in response to WM_PAINT)
  120. Do your rendering loop.
  121.     hdc = GetDC(theDocument->fWindow);
  122.     Q3View_StartRendering(theDocument->fView );    
  123.     do {    
  124.         Q3Shader_Submit( theDocument->fIllumination, theDocument->fView );    
  125.         Q3Style_Submit( theDocument->fInterpolation, theDocument->fView );    
  126.         Q3Style_Submit( theDocument->fBackFacing, theDocument->fView );    
  127.         Q3Style_Submit( theDocument->fFillStyle, theDocument->fView );    
  128.         Q3MatrixTransform_Submit( &theDocument->fRotation, theDocument->fView );    
  129.         Q3DisplayGroup_Submit( theDocument->fModel, theDocument->fView );    
  130.     } while (Q3View_EndRendering(theDocument->fView) == kQ3ViewStatusRetraverse );    
  131.  
  132. Copy the data from the memory DC to the window using BitBlt.
  133.     BitBlt(hdc, 0, 0, theDocument->fWidth, theDocument->fHeight,    
  134.             theDocument->fMemoryDC, 0, 0, SRCCOPY);                    
  135.     ReleaseDC(theDocument->fWindow, hdc);                
  136.  
  137. Library Linking Issues
  138. This preliminary developer release includes only the debugging version of QuickDraw 3D as a DLL. This library requires MSVCR40D.DLL - the debug version of the Visual C++ 4.x C-runtime library DLL.
  139.  
  140. What's In This Release?
  141. In the Lib folder
  142.  QD3D_D.DLL - the debug version of the QuickDraw 3D 1.1 core library,
  143.         dependencies: MSVCR40D.DLL, RAVE.DLL, MSVCRT40.DLL
  144.  QD3D_D.LIB - the import library for QD3D_D.DLL
  145.  
  146.  MSVCRT40.DLL - the releae C-Runtime library DLL (from Visual C++ 4.1)
  147.  
  148.  RAVE.DLL - a preliminary release build of QuickDraw 3D Accelleration library version 1.1
  149.          dependencies: MSVCRT40.DLL
  150.  
  151.  3DViewer_d.DLL - a preliminary debug build of the 3D Viewer for Windows
  152.         dependencies: QD3D_D.DLL, MSVCR40D.DLL, RAVE.DLL, MSVCRT40.DLL
  153.  3DViewer_d.LIB - the import library for 3DViewer_d.DLL 
  154.  
  155. In the Interfaces folder
  156.   The public interfaces for QD3D_D.DLL and 3DViewer_d.DLL 
  157.  
  158. In the Samples folder
  159.   QD3DSample - a simple application which demonstrates using the QuickDraw 3D core library to load and display 3D data. This sample implements double buffering using a pixmap draw context as described above.
  160.  
  161.   ViewerSample - a simple example of using the QuickDraw 3D Viewer Controller in a Win32 application.
  162.  
  163. Documentation
  164. The "Documentation" subdirectory of this release includes Adobe Acrobat PDF versions of the QuickDraw 3D reference "3D Graphics Programming With QuickDraw 3D", the preliminary "3D Metafile Reference" as well as two introductory articles from Apple technical journal develop. Even though the develop articles discuss using QuickDraw 3D with the MacOS most of the material contained therein is equally applicable to the Win32 version of QuickDraw 3D. 
  165.  
  166. The Adobe Acrobat Reader for Windows is included in the "Documentation" directory.
  167.  
  168. "3D Graphics Programming With QuickDraw 3D" is available from Addison-Wesley Publishing Company. ISBN 0-201-48926-0
  169.  
  170. Redistribution
  171. No part of this Preliminary Developer Release may be redistributed at this time.
  172.  
  173. Feedback
  174. Send your comments and feedback on this release to S.HOPWOOD@AppleLink.apple.com. 
  175.  
  176. In the event that you have to report a problem please be sure to specify that you are using this WWDC preliminary Win32 developer release and be sure to include a complete description of your PC system configuration including video board and video driver configuration.
  177.  
  178. Apple Computer's 3D technologies evangelist, Shawn Hopwood (S.HOPWOOD@AppleLink.apple.com) is eager to work with developers.  Contact Shawn with details of your product.
  179.  
  180. Thanks for choosing QuickDraw 3D, and good luck with your development efforts!!
  181.  
  182. The QuickDraw 3D team.
  183.  
  184.