Archived

This topic is now archived and is closed to further replies.

Dr Jeckl

Direct X in C

Recommended Posts

Is it possible to use the DirectX libraries in C. If not is there any game programming libraries for C. I''m trying to start simple so dont hate. It takes many to live but it takes one to die.

Share this post


Link to post
Share on other sites
Direct3D is an object-oriented API, but Direct3D does have a set of functions for C. OpenGL, on the other hand, was built entirely for C. OpenGL would be easier for you to find tutorials on because there are not only more OpenGL tutorials than Direct3D but also because it would be hard to find a way to learn the C version of Direct3D, whereas OpenGL''s only implementation is in C.

Share this post


Link to post
Share on other sites
quote:
Original post by elendil67
Direct3D is an object-oriented API, but Direct3D does have a set of functions for C. OpenGL, on the other hand, was built entirely for C. OpenGL would be easier for you to find tutorials on because there are not only more OpenGL tutorials than Direct3D but also because it would be hard to find a way to learn the C version of Direct3D, whereas OpenGL's only implementation is in C.


Replace every instance where you wrote Direct3D with DirectX and I'll be even more merry.

[edited by - masterg on January 18, 2003 7:38:11 PM]

Share this post


Link to post
Share on other sites
DirectX in C is possible and not that difficult if you know what you''re doing. You can find a few sample progs here: DirectX in C. These progs were written for use with the lccwin32 compiler system which is C only (no C++ but some C++ like extensions - references, operator and function overloading).

Share this post


Link to post
Share on other sites
quote:
Original post by elendil67
Direct3D is an object-oriented API, but Direct3D does have a set of functions for C.

Wrong, at least not entirely correct:

DirectX by itself is a COM API. It does not have specific functions for C nor for C++, it only ''knows'' COM. COM in the other hand does work on C, C++, VB, C# and lots of other languages.

To answer the OP:s question: Yes, it is possible to use DirectX in C.



Update GameDev.net system time campaign: ''date ddmmHHMMYYYY''

Share this post


Link to post
Share on other sites
Try again. As of DX 8.0 (IIRC), one of the DX modules was no longer usable in a C program. It was either DirectInput or DirectMusic. I can''t recall exactly. I do remember a big fuss about it from a few C programmers on the DX Dev list. The reason is that no C interface was provided for that particular module.

Share this post


Link to post
Share on other sites
Thanks LessBread I checked the website out and checked out some of the DirectX Programs, and was familier with what was goin on in the code. But what about OpenGL can it really be used in C and can it be versitile in a C enviroment.

It takes many to live but it takes one to die.

Share this post


Link to post
Share on other sites