Direct X and C#

Started by
4 comments, last by Scet 16 years, 10 months ago
Hi, I am currently using C# and decided to use DirectX with it. I have installed DirectX and was wondering where you tell C# to look for the DirectX files like you would in C++, I can't seem to find where to do this. Also which files would I need to import. thanks
Advertisement
I don't really remember how I installed MDX, but I think there should be a folder someplace in the SDK with a bunch of Microsoft.Direct*.DLL files. These are the MDX .Net assemblies you need to add to your project.
your right there are the MDX files, but does anybody remember how to add these files;)

I need this because for the simple ping pong tutorial off the XNA website, my program wont compile because theres no DirectX device installed or something like that.
I'm pretty sure that the DirectX SDK only contains the unmanaged versions of DirectX and Managed DirectX 1.1, XNA is a seperate download. At least that's how it was with the last SDK I got(which was quite a while ago).
They are seperate but, as I said I'm going through the Ping Pong tutorial from the Learn XNA website and pretty much the first thing in the video is to compile an empty program so you just get a blank screen but when i do this I get an error saying:

Microsoft.Xna.Framework.NoSuitableGraphicsDeviceException was unhandled
Message="Could not find a Direct3D device that has a Direct3D9-level driver and supports pixel shader 1.1 or greater."

any ideas?
Quote:Original post by TaeKwonDo
Microsoft.Xna.Framework.NoSuitableGraphicsDeviceException was unhandled
Message="Could not find a Direct3D device that has a Direct3D9-level driver and supports pixel shader 1.1 or greater."


Basically your video card sucks and doesn't even support pixel shader 1.1 which is the minimum required to use XNA.

If you want to use XNA you'll have to buy a new card(get one with at least shader 2.0 support), if you don't want to do that then use Managed DirectX.

This topic is closed to new replies.

Advertisement