Difference between DX8 and DX9 ?
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
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.
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.
Omg, how could i miss that lol.. Sorry guys, yeah i'm gonna change all functions right now ;) Thanks
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement