DirectX

This is a discussion on DirectX within the C++ Programming forums, part of the General Programming Boards category; Hi everyone! All I want to do is work through a DirectX tutorial, any tutorial, but I canít believe how ...

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    33

    DirectX

    Hi everyone!

    All I want to do is work through a DirectX tutorial, any tutorial, but I canít believe how much trouble this has caused me.

    Ok, I should point out that I am a beginner. Iíve spent two months learning VB with 2010 Express and am now learning c++ using 2010 Express IDE.

    I seem to pick up the coding side pretty quickly but as soon as I have to delve into any systems type stuff Iím completely lost.

    Iím running XP pro SP3 x86 on an ancient Dell 4100

    Iíve downloaded the latest DirectX SDK (June 2010), which says compatible with XP.

    When I run dxdiag, all the graphics tests run correctly.

    The version shows as DirectX 9.0c

    The files like d3d9.dll show up and they are in: c:\Windows\system32
    The ones like Microsoft.DirectX.Direct3D.dll are in: C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0

    Iíve no idea what the difference between these two distinct groups is.

    Anyway, trying to reference the Microsoft.DirectX.Direct3D dllís manually in VB Express made my PC hang with an unending delay notification and I got no further, which is why I have started to learn c++.

    Then I tried the DirectX SDK samples, which are in c++.

    When I copy Tutorial01 and compile it in c++ 2010 Express I get d3d11.dll not found.

    There is a D3D11Ref.dll in system32 lib and in C:\Program Files\Microsoft DirectX SDK (June 2010)\Developer Runtime\x86

    Somebody else on this forum posted about this four months ago, which is how I found you and why I posted in this section. He eventually got himself sorted but the instructions given were above my head.

    Iíve spent days trying to get into DirectX and havenít got anywhere so would be grateful for a shove in the right direction.

    Thank you.

  2. #2
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    681
    About tutorials, I would recommend DirectX Tutorial.com - Game Programming with DirectX

    Despite of the fact, that there is no error checking (which is very important in directx, but might also obsfucate code for a beginner), it has a brief explanation of the directx basis.

    And why do you want to link any dx11 libs if you work on an ancient dell and want dx9? You can try to find an older SDK version.

  3. #3
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    (Note that Windows XP only supports DX9.)

    I'm confused, are you trying to do this with VB or C++? DirectX is COM-based and thus its native language is C++. This doesn't mean you have to use C++ to use DirectX though. Managed DirectX is deprecated and only supports interfaces up to DX9. You can still use it, but I wouldn't invest too much effort in it.

    Microsoft's XNA has replaced Managed DirectX, kinda... it seems to be targeted toward game developers more than general-purpose users. SlimDX is a project that is creating a .NET wrapper for DirectX which is up-to-date.

    So, are you trying to work with C++ or VB.NET? Honestly though I'm kinda tempted to say forget about VB.NET and learn C# (or C++ but native DirectX programming isn't noob-friendly)

  4. #4
    Registered User
    Join Date
    Sep 2010
    Posts
    33
    Thank you kmdv and BMJ,

    I will take your advice and forget about VB.NET with Managed DirectX.

    I am going to continue learning c++.

    And I will take a look at some of those links. The DirectX Tutorial looks promising.

    Can I stick with this latest version of SDK? I set a restore point before downloading it so could find an older version if need be.

  5. #5
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    Yes you can use the latest SDK and still create DX9 objects. The samples in

    %ProgramFiles%\Microsoft DirectX SDK (June 2010)\Samples\C++\Direct3D

    They're all D3D9 and should be usable by you. Make sure you add the DirectX "Include" and "Lib" to your projects first.

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    The only things that won't work in the latest SDK are DirectMusic and possibly DirectInput. DirectMusic has been removed and deprecated and DirectInput was supposed to be replaced with XInput. Again, not sure on the exact status of the latter.

    No worries b/c all DirectInput did was listen to the WM_DATA message in a WndProc inside of a separate thread. It had a bit of overhead and you can pretty much do the same without all of that.

  7. #7
    Registered User
    Join Date
    Sep 2010
    Posts
    33
    Thank you all for your help, it really helped clarify things for me.

    Iím up and running at last and have my first triangle rendered to screen using c++ and dx9.

    To be honest Iím just looking to write some 2D games using Direct3D. I donít know if thatís a good route to take.

    I messed around with VB.Net and GDI+ but I realised/read that it was not going to be fast enough and that using Direct3D for 2D was good, though more difficult.

    Anyway, I definitely want to stick with c++, I really enjoy it.

    Not interested in games engines or anything like that.

  8. #8
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    To be honest I’m just looking to write some 2D games using Direct3D. I don’t know if that’s a good route to take.
    2D is fine but the hardware will fight you the entire way. The hardware is designed for 3D so you will still be doing 3D even if you are only really trying to do 2D.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with my DirectX program
    By fighter92 in forum Game Programming
    Replies: 1
    Last Post: 01-23-2007, 05:28 PM
  2. Isometric Tile Engine using DirectX
    By Wraithan in forum Game Programming
    Replies: 3
    Last Post: 07-17-2006, 12:16 PM
  3. DirectSound header issues
    By dxfoo in forum C++ Programming
    Replies: 0
    Last Post: 03-19-2006, 06:16 PM
  4. DirectX - Starting Guide?
    By Zeusbwr in forum Game Programming
    Replies: 13
    Last Post: 11-24-2004, 11:49 PM
  5. DirectX 8 with Borland
    By Tommaso in forum Game Programming
    Replies: 11
    Last Post: 08-12-2003, 09:30 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21