Can I use DirectX with C?
Yes, it is possible. I even think there is a document on it somewhere on this site. However, those who have done it and lived to tell describe it as a rather painful experience.
Besides - you don''t really need to learn much C++ in order to utilize DirectX from it. Most of the basic DirectX tutorials and examples look like some kind of C''ified C++ anyway.
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
Besides - you don''t really need to learn much C++ in order to utilize DirectX from it. Most of the basic DirectX tutorials and examples look like some kind of C''ified C++ anyway.
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
This is the place where it teaches you how to use C and DirectX to make Tetris:
http://gamedev.net/community/forums/forum.asp?forum_id=33
http://gamedev.net/community/forums/forum.asp?forum_id=33
You can use C with DirectX, but each time you call a directX function, you must refer to the ''vtable, something like this:
pDevice->vTable->SomeCommand(), and you can''t use D3DX, as it''s object oriented.
--------
Leave all your expectations behind, or
they''ll pull you down on your way to the top.
-Ivan
pDevice->vTable->SomeCommand(), and you can''t use D3DX, as it''s object oriented.
--------
Leave all your expectations behind, or
they''ll pull you down on your way to the top.
-Ivan
quote:Original post by Death Hunter
You can use C with DirectX, but each time you call a directX function, you must refer to the ''vtable, something like this:
pDevice->vTable->SomeCommand(), and you can''t use D3DX, as it''s object oriented.
--------
Leave all your expectations behind, or
they''ll pull you down on your way to the top.
-Ivan
You can use D3DX just fine in C. They''re structs and interfaces, just like D3D.
I like pie.
quote:Original post by Death Hunter
pDevice->vTable->SomeCommand()
More precisely:
pDevice->lpVtbl->SomeCommand(pDevice, other args... )
For more of this, take a look at the C macros in the various DX headers.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement