NO

Author Topic: Dirext X 9  (Read 5454 times)

31si

  • Guest
Dirext X 9
« on: November 10, 2008, 12:11:26 PM »
I am currently studying Computer Science at university. For one of my modules I have to use directX. it has been suggested that we use visual studio to develop the code, however I am not overly keen on using proprietary software. I have seen and tested the dirextX sample code on the main site and it works however for the assignment we have to use directX9. I have tried getting direct X 9 to work and I can't seem to do it. Could anyone give me a few pointers (no pun intended) about how to do this?

Ngan Lo

  • Guest
Re: Dirext X 9
« Reply #1 on: November 10, 2008, 02:44:04 PM »
couple years ago, I tested DirectX9 to do some hobby programming, I don't know if the recent ver., still can compile within PellesC. anyway, you still can use DirectX in C, just one thing you need to know.

DirectX is COM, so C uses virtual-tables or marcos to access :
Code: [Select]
in C++ : pD3D->GetDeviceCaps(&D3DCaps);
    in C : pD3D->lpVtbl->GetDeviceCaps(pD3D, &D3DCaps);
      or : IDirect3DDevice9_GetDeviceCaps(pD3D, &D3DCaps);
    pre-defined macro can found in D3d9.h.

I was able to link M$ DX9 lib, if you cannot link recent DX9 lib with PellesC, maybe you really need to consider to use VC++ express version (which is free).

pgoh

  • Guest
Re: Dirext X 9
« Reply #2 on: November 13, 2008, 07:29:56 PM »
I am not overly keen on using proprietary software.

Pelles C differs in this respect ... how?