Jump to content
  • Advertisement
Sign in to follow this  
TaeKwonDo

Direct X and C#

This topic is 4065 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!