News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Dirext X 9

Started by 31si, November 10, 2008, 12:11:26 PM

Previous topic - Next topic

31si

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

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 :

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

Quote from: 31si on November 10, 2008, 12:11:26 PM
I am not overly keen on using proprietary software.

Pelles C differs in this respect ... how?