I am looking for a directX tutorial that uses C. I have searched online using google and can only find C++ tutorials and not C. Does anyone have any links to such tutorials.
Thanks.
- Sean
I am looking for a directX tutorial that uses C. I have searched online using google and can only find C++ tutorials and not C. Does anyone have any links to such tutorials.
Thanks.
- Sean
If cities were built like software is built, the first woodpecker to come along would level civilization.
Black Frog Studios
DirectX is OO and COM based. If you want to use it, I recommend using a C++ compiler at least. Trying to write DX code in C can be a pain as you have to dereference the virtual pointer table yourself.
Stick to C++ if you can (IMHO).
The only information i've seen on this is in a book that i bought (i can't remember which one might have been Andre's "Tricks of The Windows Game Programming Gurus" but i'm not sure.
good luck!
U.
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.
cant u do non OO stuff with DX
DirectX uses COM interfaces ( similar to C++ classes ), that means whatever you want to do with DirectX you do it through calling a method of the object you created.Originally posted by pode
cant u do non OO stuff with DX
C programmers have to use a function pointer form a function table in order to call methods, which is a bad way to do things.
Microsoft provides a solution - which is also bad by the way - using macros :
If in C++ you call the method IDirect3D::CreateDevice( parameters go here ), then in C you'd call the macro IDirect3D_CreateDevice( Pointer to an IDirect3D object, parameters go here )
As you can see, an additional pointer is needed when calling the macro, as the macro uses the function table in that object to do the call.
How did you stumble in a C only compiler anyway? Borland's C++ 5.5 is free, although it's a little painful to work without the IDE.
Muhammad Haggag