XNA Creators Club Online
Page 1 of 1 (6 items)
Sort Posts: Previous Next

Basic DirectX question

Last post 01-14-2008 2:19 PM by David Hunt. 5 replies.
  • 01-14-2008 1:27 PM

    Basic DirectX question

    Hi,

    I already have DirectX SDK (April 2007) installed in my system. However, my program can't find it when I type "using Microsoft.":



    What should I do? I tried opening the samples from DirectX SDK and they worked. I don't know how to connect DirectX SDK to XNA GSE. Please help me.
  • 01-14-2008 1:32 PM In reply to

    Re: Basic DirectX question

    If you're looking for a namespace that begins with "Microsoft.DirectX" you won't find one. XNA isn't MDX. All the namespaces you need for XNA are under Microsoft.XNA. For example, what used to be the DirectX device is now the GraphicsDevice and is in the Microsoft.XNA.Framework.Graphics namespace, as are textures, surfaces, etc.

     

  • 01-14-2008 1:41 PM In reply to

    Re: Basic DirectX question

    Oh, I think I found the answer. I just added Microsoft DirectX stuff into my project's References. O_O Anyway, if there's any other easy way, please let us know. Thank you. :)


  • 01-14-2008 1:47 PM In reply to

    Re: Basic DirectX question

    If you're using XNA, you DON'T want to be referencing any of the Managed DirectX assemblies. They don't play together at all. You can use DirectInput, but don't try to use the others.

    Why do you think you need to reference anything in the Microsoft.DirectX... namespaces?

  • 01-14-2008 1:52 PM In reply to

    Re: Basic DirectX question

    I was just basing on this example: [link] O_O Uhmm.. what's the right way to do it?

    I need to know how to use the normal joystick/gamepad in Windows PC..
  • 01-14-2008 2:19 PM In reply to

    Re: Basic DirectX question

    Well, as I said, using DirectInput is fine. I thought you were trying to use DirectX graphics, which won't work with XNA.

    The "right" way is to add a reference to the Microsoft.DirectX.DirectInput assembly as you showed in your previous post. Just select Microsoft.DirectX.DirectInput. Then add "using Microsoft.DirectX.DirectInput;" to whatever source files will be making use of the namespace.

     

Page 1 of 1 (6 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG