Sign in to follow this  
TaeKwonDo

Direct X and C#

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this