////////////////////////////////////////////// /// /// /// 3D Graphics Programming for Windows 95 /// /// /// ////////////////////////////////////////////// by Nigel Thompson Microsoft Press, 1996 Companion CD Installation Instructions: --------------------------------------- 1. To install the sample programs on your hard disk, insert the CD into your CD-ROM drive and run Setup.exe. If you install with the default setup, a \3d directory will be created on your hard disk and all the sample files and directories will be placed in that directory. 2. To install the DirectX 2 SDK, insert the CD into your CD-ROM drive, and run \DirectX\Setup.exe. 3. If you want to install the contents of the \Tools directory from the CD to your hard disk, you must copy the contents manually. Additional Files on the CD: --------------------------- Included on the CD with the sample files are three additional files that you might find useful. You must edit these files before running them IF you did NOT install the samples with the default settings. build.bat - builds all the samples at once. CleanMFC.exe - cleans the Debug directories after building the sample projects and leaves only the EXE files. setenv.bat - sets your environment for the build.bat. Warning Messages: ----------------- When you first open the sample projects inside Visual C++, you might get a warning message saying "Not all of the windows in the workspace could be opened" This is just a warning and you will only see it the first time you open each project. This warning occurs because some of the include statements that are part of the DirectX software are declared in such a way that causes the Visual C++ dependency generator to include a full path to the file when the project is saved. Your path may be different than the path used to save this file originally, so you see the above message. Once you close the project, Visual C++ will save your path so the next time you open the project you won't see the warning. DirectX 2 SDK Issues: --------------------- This is a first release of the DirectX SDK, so the drivers might not work on all machines. Please look at the SDK release notes if you are having problems. Shapes Sample (Chapter 4): -------------------------- As you read Chapter 4, you will find a note describing a known problem that can occur when you run the Shapes sample program. One of the Edit menu options in the Shapes sample is Landscape 1. Selecting Landscape 1 is supposed to show you a shape that looks like a landscape. Sometimes, right in middle of your landscape, you will see an obviously out-of-place spike going right through your scene. This is a bug in the DirectX software that has been reported as is being worked on, but was not fixed for this first release of DirectX. One way to remove the spike is to resize the window. The other way is through a workaround suggested by the DirectX developers that you can include if you want to: In the 3dPlus project, in the 3dShape.cpp file, edit the C3dShape::CreateSurface function as follows: ... for (int iRow = 0; iRow <= iXSteps; iRow++) { z= z1; for (int iCol = 0; iCol <= iZSteps; iCol++) { pv->x = D3DVAL(x); pv->y = D3DVAL(y); pv->z = D3dVAL(z); // ADD THE FOLLOWING IF STATEMENT // if (pv->z == 0.0f || pv->z == -2.0f || pv->z == -4.0f || pv->z == -6.0f) pv->z = D3DVAL(z) + 0.01f;