Q: What version of DirectX will your book cover?
Answer: It will cover the most currently available version of DirectX Graphics at the time of completion of the manuscript. Currently that is the "SDK Update" release for DirectX 9.0 which is in beta as of May, 2003. The contents of the book will cover the core Direct3D interfaces, the D3DX utility library and the .x file format. Material on the DirectX SDK itself will also be covered: sample framework, installing the SDK, etc.
Q: When will your book be available?
Answer: My current thinking is to get it on the shelf in 2004.
Q: Why is your book taking so long?
Answer: There are two parts to this question. First, there is the simple fact that never having written a large book before I simply underestimated the amount of time it would take to write the book that I wanted to write. If I couldn't write the kind of book I wanted, I didn't see the point. Writing a book like this is easily a full-time job by itself and I have a regular full-time job and a regular life on top of this huge personal project.
Second, there is the amount of material to cover. I am not writing a "surface" book, where you read it for a couple weeks and put it on your bookshelf and never look at it again. I was writing the kind of book that you want to keep right next to your computer while you're programming because you know its going to help you as a working reference. At the same time I wanted it to be organized in such a way that you could read the book linearly with each successive chapter building on the concepts explained previously.
This book will be published one way or another, even if I have to publish it myself on the web.
Q: Will you cover DirectSound, DirectInput, etc.?
Answer: I will not cover DirectSound, DirectInput, DirectMusic, DirectPlay or DirectShow. To cover all of DirectX I think would take three good-sized books: a book on Direct3D, a book on DirectShow and one more covering the remaining technologies. Rather than try to cover everything in DirectX, I'm focusing strictly on Direct3D to make the text focused and as complete as possible. The DirectXSetup API is covered in a chapter on installation.
Q: Will your book cover the managed API?
Answer: The book itself will not cover the managed API; all of the discussion and API syntax given in the book will be for the C++ COM API. However, all of the conceptual explanations of the API features and how they work apply equally well to the managed API. The sample programs included with the book will be available in C++ using the COM API as well as versions in C# and Visual Basic.Net using the managed API.
Q: Will you talk about game development?
Answer: My personal graphics background is in scientific visualization, CAD and interactive graphics. Several of my colleagues who work in the gaming industry have graciously volunteered to serve as reviewers for my book, so relevant insights from the gaming industry will feed into the book's development. However, my focus is on teaching the reader every piece of the Direct3D graphics pipeline. Every 3D game developer needs to understand the graphics pipeline before they can make a really great game, so I think game programmers will benefit from my book. However, I will leave the subject of game development to those authors that really know games from having worked in the trenches.
Q: How much of your book is devoted to fixed-function features as opposed to shaders?
Answer: Both are thoroughly covered. Shaders generalize the fixed-function parts of the pipeline, making them both more powerful and more complex. The book introduces you to the concepts of the fixed-function pipeline, one by one, before generalizing them to the procedural shaders in a consistent framework.
Q: Will you discuss the framework used by the SDK samples?
Answer: Yes. I will not go into a line-by-line analysis of the sample code framework that comes with the SDK, but I will explain the framework enough that when you dissect an SDK sample, you know where to look for the interesting bits and what parts are boiler plate that you can safely ignore. In the meantime, you might want to read Phil Taylor's Driving DirectX column, Start with D3DFrame that explains the DX7 sample framework. A more recent Driving DirectX column, Using Vertex Shaders, Part 1 describes the evolution of the D3DFrame from DX7 to DX8.
Q: Will it cover the whole API or just the basics?
Answer: The book will cover the entire API: the core Direct3D structures and COM object interfaces, the D3DX utility library data types, functions and COM object interfaces, and the X file format. A significant improvement over the SDK documentation comes from the organization and presentation of the material in my book. The material can be read sequentially for an understanding of the entire pipeline, or advanced material (such as shaders) can be skipped on a first reading allowing the reader to get a basic understanding of how to write a graphics application.
Q: Will the discussion and examples be self-contained and modular, or is it structured around progressively building up a game or other application across chapters?
Answer: The discussion will be modular and not tied to any of my own classes or an application that you must understand first. Portions take an application scope view of the pipeline to make the reader aware of issues that affect the whole application and not just details of the pipeline stages.
Q: Will your book use an API "wrapper"?
Answer: I'm not a fan of API wrappers unless they add significant value. Portions of windowing toolkits like MFC and WTL are essentially wrappers around the "objects" in the Win32 API. Direct3D represents objects natively to C++ applications and there is no need for a wrapper to make it more object oriented. However, while developing sample applications for Direct3D I have created a collection of commonly used idioms that I found convenient as a way to factor out common operations from my code. Some of these idioms are described directly in the book and most are self-evident from reading the source code that uses them. The source code for all the idioms is provided and freely available for you to use in your own programs.
Q: How much value will the book add beyond what's in the DirectX SDK docs?
Answer: Although I study the SDK documentation and annotate my own personal copy with errors that I find, I am not using any of its organization or explanations as my own. I feel that providing a distinct separate explanation of all the concepts will add value for anyone who has ever read the SDK documentation and was left scratching their head wondering what it really meant. What good is a book if it just repeats the SDK explanation that confused you in the first place?
Q: Is your book a beginner's book?
Answer: I assume that the reader knows how to program C++ applications and has some experience writing Win32 Windows applications in particular. I don't explain how to register a window class or the event processing mechanism in Win32 API. 2D graphic applications, such as a traditional GDI based application, require relatively simple mathematics. Three dimensional graphic applications require familiarity with basic geometry, vectors and matrices. You don't have to be Einstein, but you should have heard of vector cross product before. These mathematical concepts are important for any 3D graphics programmer. The relevant mathematics are summarized in the introductory chapter.
Q: Is it a 'tricks' book?
Answer: All the 'tricks' of using 3D graphics hardware to its utmost were thought up by people who had a thorough understanding of the graphics pipeline. This book teaches you what the tricksters know when they think up new tricks! With a solid grasp of the pipeline you will be able to understand other people's 3D graphics 'tricks' easier, helping you create tricks noone else has seen before.
Q: What language will be used for the example code?
Answer: All the code excerpts and listings in the manuscript will use C++ as the example language. This is the language most commonly used with Direct3D, although you can use Direct3D from a variety of languages. Sample programs included with the book will be supplied in versions for C++, C# and Visual Basic.Net.