A search of amazon.com in regards to directx10 books yields only three entries: Wendy Jones’ book, a book by peter Walsh which by all account is just a basic update of his previous directx9 book and recently a new book by frank luna which also seems just like an update of a previous book.
I purchased Wendy Jones’ book: Beginning DirectX 10 Game Programming in January of this year and have only recently had the time to sit and go through it. In brief I wasn’t very impressed. This book is nothing more than a rehash of the tutorials available in the DX10 sdk, and to make matters worse you would think that she’d make an effort to improve upon the tutorials, that there would perhaps be more depth and clarity, unfortunately she doesn’t.
What she’s done is taken clear concise tutorials and made them overly long, convoluted and tedious. All the problems in regards to explanation and presentation that are present in the SDK tutorial are present in her book. For example in one tutorial, they just show the instantiation of an object but never specify the object type name, so you have to dig around a little bit to get it, in her book the exact same thing occurs for the exact same section.
The only unique section she has is a chapter dealing with sprites which is not covered in the sdk tutorials and that could have been the only redeeming feature of the book but even that is written badly. What should be a short simple chapter gets dragged out, that chapter is nearly the length of the entire 3d section of the book.
Moving onto the 3D chapters, apart from the generic 3D primer and the cut and paste sections from the tutorials, there is practically no in depth information about what makes directx 10 different from directx 9 or even openGL. Lets not even get started on the quality of code present in the tutorials, i don’t understand why she even attempted to rewrite the tutorials, she may as well have included the sdk examples. She does created a “modelObject” structure but this is not exactly a major change.
Also this book is entitled “beginning directx10 game programming” but should rather have been called “rendering 2 cubes and a basic mesh in directx10” as this is the depth in which the text goes into. I’m not sure what the target audience is but having less than a 100 pages of a 350 page book dedicated to 3D graphics is plain unacceptable. The rest of the chapters cover directinput, and xinput.
Her explanations in these 100 pages are unclear, and the only depth covered is an explanation of input parameters which any beginner can get from the sdk docs anyways, there is absolutely no explanation of what functions actually do, why they do them and give the reader a basic intro into the dx10 pipeline and API. A lot of important information is missing and i had to end up digging up myself, especially in regards to displaying multiple objects.
Let me try explain how bad the source code examples are: in the triangle example she calls an initTriangle function to initialize the triangle, this now goes and creates an input layout. Now for a beginner, they might assume that for every object you make you need to create an input layout, seeing as the modelObject structure has that as a member. When in reality you only need to create one input layout for a specific vertex type, and only swap it if you pass through different types of vertices. The same goes for effects and techniques. Also she never really mentions how you would handle multiple objects properly, especially with the lack of a fixed function pipeline.
The just for a low blow, in the example where she renders a 3d cube, the initialization function is called and wait for it: initTriangle… You can see a lot of effort went into this book. (sarcasm!)
I feel the author herself doesn’t have a solid grasp of DX10 and has ended up just writing a book for the hell of it, her tutorials don’t convey any level of understanding but rather just say: want a vertex run this function call.
UPDATE: I’m now sure the author has very little understanding of dx10, in her book she implies that you need to create a vertex buffer for every object you wish to draw! This is a bad practice especially in regards to performance. The vertexbuffer is a block of memory which you fill prior with vertices prior to sending it to IA. You’ll have a list of vertices stored in an object container, and you would load up the vertex buffer with the vertices from the object and then draw it. Seeing as there is no way to change the size of the buffer once created nor is there a way to delete it, all you can do is update the data stored within the buffer. That is the reason the draw call takes the number of vertices and the offset as a parameters.
So why cant we just create a buffer for each object, imagine we have a scene with 1000 objects, each object has 1000 vertices, so now we have 1 000 000 vertices stored in memory, the swapping of vertex buffers is a slow operation and having to swap out the vertex buffer 100 times each frame has a major performance impact.
I’ve gone through her book thoroughly and then started to do a very basic b-spline demo in dx10 and quickly realized how much information i was missing, how badly things were explained and how she’d simply ripped off the sdk tutorials. I also ran into a major problem trying to organize and store my objects never mind draw them, I’ve spent two weeks messing around until i finally ended up slapping together a very basic DX manager class with a polymorphic object container hierarchy.
My advice is avoid this book, don’t waste your money, rather download the dx10 sdk and go through their tutorials, you’ll find them more useful and better explained.
Oh and speaking of ripping off tutorials: there is this jackass ( http://www.kevindonde.com/ ) that is ripping off her tutorials and putting them up on the net as his own.
I’ve spent the better part of two weeks now digging in the SDK docs and browsing the web for solutions to my very basic problems and so forgive my frustration. I will hopefully write my own tutorials on directx 10 in the upcoming weeks and i do hope that they might actually be more useful than hers. I’ll also try and get hold of frank luna’s book and see if that is any better.