Difference between DX8 and DX9 ?

Started by
4 comments, last by owiley 18 years, 4 months ago
Hey people, well i was experimenting with code and found online some tutorials for Directx8. They work, and i have at the top these lines: #include <d3dx8.h> #pragma comment(lib,"d3d8.lib") #pragma comment(lib,"d3dx.lib") #pragma comment(lib,"winmm.lib") Well, I thought if i change the 8s to 9s like below it wouldn't change anything: #include <d3dx9.h> #pragma comment(lib,"d3d9.lib") #pragma comment(lib,"d3dx.lib") #pragma comment(lib,"winmm.lib") But it gives me many weird errors.. This is the first one: syntax error : missing ';' before identifier 'g_pD3D' Is there something else i should include(libraries or header files) to make it work under Directx9? Thank you :D
Advertisement
Are you trying to use DX8 code while including DX9?
IDirect3D8 becomes IDirect3D9. IDirect3DDevice8 becomes IDirect3DDevice9. Same for everything else.

There are some changes in the underlying system that might get you. For example, the addition of the SetFVF function for using fixed function, instead of SetVertexShader.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Omg, how could i miss that lol.. Sorry guys, yeah i'm gonna change all functions right now ;) Thanks
Yeah, well i had to change some functions a little but it works thanks you all :D
if you are doing a engine you could support both 8 and 9 just need the right files...This is how irrlicht support the younger bother 8....note there isnt a reason to mix the two hence when i say support it is used by it self.
Bring more Pain

This topic is closed to new replies.

Advertisement