Archived

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

mcstar

Direct X via .Net (or C Sharp)

Recommended Posts

mcstar    122
Does anyone have any experience using Direct X through the .Net platform. I''ve not seen one scrap of information, examples, what have you, about it. I realize .Net is not officially out, but we''ve been using it at the office (beta 1 & 2) for several months and I''m just itchin to get a true .Net game going. I know of only 1 game written using .Net (digger)(not Direct X) the source code is available, but poorly documented. Any advice out there?

Share this post


Link to post
Share on other sites
Shannon Barber    1681
The DirectX is a set of COM objects - which means you need to build a .Net app that accesses unmanaged code.

You can still call CoCreateInstance right?
All you should have to do is make a C++ program and include the Dx headers.

Share this post


Link to post
Share on other sites
Arild Fines    968
Try searching the archives of the MS .NET newsgroups. I believe I have seen links posted as to how to use DX8 in .NET. http://groups.google.com is a good place for that. Take a look at the microsoft.public.dotnet groups.

Magmai: If you''re going to use a COM component, you wont have to deal directly with unmanaged code. VS.NET can generate a .NET wrapper for you.

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts

Share this post


Link to post
Share on other sites
jchunn    122
There is an example in the Framework sdk. To find it, go to

c:\program files\microsoft visual studio.net\frameworksdk\samples\interop\basic\directx\directdraw\

I know, its hidden deep, and it is dx7, but I hope it helps. Be sure to read the readme file.

Jesse

Share this post


Link to post
Share on other sites
mcstar    122
jchunn, thanks for that link. On my system its path is : C:\Program Files\Microsoft.NET\FrameworkSDK\Samples\technologies\interop\basic\directx\directdraw\readme.htm

Perhaps that will help someone else. Seems they changed the path (maybe for beta 2). Once again, thanks, I''d have never found it without you.

BTW, for all,
I''ve gotten the Digger source (in C#) working using the debugger tool with .Net
C:\Program Files\Microsoft.NET\FrameworkSDK\GuiDebug
I compiled it on the command line and have been working through the code. It is very well written. We could start a thread discussing the digger game if anyone is interested.

Share this post


Link to post
Share on other sites
Arild Fines    968
quote:
Original post by Magmai Kai Holmlor
[quote]
VS7 b2

I have that installed, I can't seem to find anything that lets me edit code and compile it.



Uhmm... you have Visual Studio installed and you cant find anything that lets you edit code?

EDIT: Misplaced quote tag



"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts

Edited by - Arild Fines on November 9, 2001 12:13:32 PM

Share this post


Link to post
Share on other sites