Someone must know

This is a discussion on Someone must know within the C++ Programming forums, part of the General Programming Boards category; The problem seems to be mixing DX8 and DX9 files. The first DirectX include is a DX8 file, the second ...

  1. #16
    Cat
    Cat is offline
    Registered User
    Join Date
    May 2003
    Posts
    1,571
    The problem seems to be mixing DX8 and DX9 files. The first DirectX include is a DX8 file, the second is DX9. Pick one or the other and stick to it; either use DirectX 8 or DirectX 9 but you can't mix and match.

    You might be able to get it to work simply by changing the first include to:

    #include <D3DX9.h>

    as DirectX 9 should still supply all the interfaces for DX8.

    And no, it's not finding those classes. Those errors are actually telling you that "CD3DEnumeration", "CD3DSettings", "D3DCAPS9", and ""LPDIRECT3D9" are not declared anywhere. Which is obvious; those are DirectX 9 classes but you included the DirectX 8 header (D3DX8.h) not the DirectX 9 header (D3DX9.h).
    Last edited by Cat; 07-08-2003 at 06:45 PM.

  2. #17
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    Alright, thanks..That's a big step forward. I am still getting errors from d3dapp. I am getting a bunch of errors as well from the code, maybe because d3dapp didn't work? I don't know, I am just starting Direct3D. I went through and fixed as many errors as I could find, which wasn't many.

  3. #18
    Cat
    Cat is offline
    Registered User
    Join Date
    May 2003
    Posts
    1,571
    Well, your best bet is to find a tutorial that doesn't use the sample files from the DirectX SDK. d3dapp.h is not a standard file, and the code you have was written for the version of d3dapp.h that was shipped with the DirectX 8 SDK, but the version you have is from the DirectX 9 SDK.

    In reality, it's pretty dumb to have a tutorial that requires a specific version of the SDK; try getting a better tutorial, or try starting from one of the DX9 sample files, not a DX8 sample file, and modify it as you see fit.

  4. #19
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    Yeah, probally, I should probally try the other examples in the book, and if they don't work at least it will still be good for looking up functions that are still in use and learning all the other stuff, like colision and such.

    Also, I went to gamedev.net and heard there was DX9 tutorials, I only saw DX7 there.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

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