Direct X via .Net (or C Sharp)

Started by
8 comments, last by mcstar 22 years, 5 months ago
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?
Advertisement
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.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Any chance getting some examples from somone whose done this?
Does .Net b2 have an IDE? Or do I have to use MSVC6 with a custom make file?

Magmai Kai Holmlor
- Not For Rent
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
quote:Original post by Magmai Kai Holmlor
Does .Net b2 have an IDE?

VS7 b2.


I wanna work for Microsoft!
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
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
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
Jesse
quote:
VS7 b2

I have that installed, I can''t seem to find anything that lets me edit code and compile it.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
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.
quote:Original post by Magmai Kai Holmlor

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
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

This topic is closed to new replies.

Advertisement