Link to home
Start Free TrialLog in
Avatar of fastawdtsi
fastawdtsi

asked on

DirectX7 vs DirectX9

Hey Everyone:

I'm looking for a good book to teach me to develope a game with DirectDraw (2D platform), and have been searching for a good book...the only book I found with good reviews has been for DirectX7.  Could I use this book to help me develope for DirectX9 DirectDraw?  All id have to do is pretty much change the '7' in all the types to a '9' and then just include the ddraw.lib and ddraw.h to get it to complie and run, right?  Thanks

Ernie
ASKER CERTIFIED SOLUTION
Avatar of scerveza
scerveza

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fastawdtsi
fastawdtsi

ASKER

How about DirectX8, could I use a DirectX8 book to build DirectX9 code?  Thanks

Ernie
Yes, DX9 is pretty darn portable with DX8. As with every new DirectX release there are minor structure changes, minor function parameter changes, and new functions added. DX7 to DX8 was the last MAJOR structural change in DirectX. DX8 and DX9 share common interfaces and for the most part just replacing 8's with 9's won't generate too many errors, but you will get some depending with what you're working on. The concepts and interfaces between 8 and 9 are virtually the same.

Here is what Microsoft documents as the changes between 8 and 9:

Changes Between DX8.1 and DX9
---------------------------
BaseVertexIndex Changes
CreateImageSurface Changes
D3DENUM_NO_WHQL_LEVEL Changes
EnumAdapterModes Changes
Get/SetStreamSource Changes
Handles
Multisampling Quality Changes
ResourceManagerDiscardBytes Changes
SetSoftwareVertexProcessing Changes
Texture Sampler Changes
Vertex Declaration Changes
Vsync, Intervals, and SwapEffects Changes

As you can see these are not major structural changes. So yes, you can get by with a DX8 book and learn DX9. And the spots where there are changes, just look in the DX9 SDK help file. DX9 still uses FMVs, Vertex Buffers, and so on, and the concepts are the same between DX8 and DX9. However, DX7 is toooootallllly different (nasty long structures with multiple union members, different interfaces, different functions, and a smaller Direct3D Extension Library). DX8 and DX9 are really nice, and i've been using them. I started out with DX7 and all I can say is,"NAAAAAASTY!"