Sign in to follow this  
Oris

Difference between DX8 and DX9 ?

Recommended Posts

Oris    122
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

Share this post


Link to post
Share on other sites
Promit    13246
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.

Share this post


Link to post
Share on other sites
owiley    257
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this