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

Supporting multiple D3D version

Last post 06-29-2008 9:07 AM by MessiahAndrw. 2 replies.
  • 05-14-2008 5:24 AM

    Supporting multiple D3D version

    After buying a new system that support D3D10.1 i wanna get started with it.

    As not many people using D3D10 hardware yet i wanna support different versions like the DXUT does
    I noticed there are currently 4 versions of D3D:
    D3D9 (XP),
    D3D9EX (Vista / D3D9 Hardware)
    D3D10 (Vista / D3D10 Hardware)
    D3D10.1 (Vista SP1 / D3D10.1 Hardware)

    To use the different version easy im using interfaces and inherited classes but was wondering on whats the best way to detect what version to use.

    1) How to detect the operating system? (XP / Vista / Vista SP1)
    2) In case of Vista, how to detect hardware capabilities? (D3D9 / D3D10 / D3D10.1)
    3) In case they run Vista SP1 but the hardware dont support D3D10.1 features, can i still use the D3D10Device1 classes?

     

    Little extra info about the project:
    Project is created using Vista SP1, VS 2008, C++

    To handle the different D3D versions im using this kinda system

    Interface class

    1
    2
    3
    4
    class IRenderDevice
    {
    // Virtual functions
    }

    D3D9 Render class

    1
    2
    3
    4
    class RenderSystemD3D9 : public IRenderSystem
    {
    // IRenderSystem methods
    }

    D3D10 Render class

    1
    2
    3
    4
    class RenderSystemD3D10 : public IRenderSystem
    {
    // IRenderSystem methods
    }

     

    At this moment im using 4 classes for the different D3D version:
    RenderSystemD3D9
    RenderSystemD3D9Ex
    RenderSystemD3D10
    RenderSystemD3D10_1

    so in case i can use the D3D10Device1 class even when D3D10.1 is not supported i can allready eliminate 1 of those classes.

  • 06-10-2008 1:00 AM In reply to

    Re: Supporting multiple D3D version

    That would be ALOT of work (thanks microsoft zzzz)...

     

    First, you need to detect what system the user has http://support.microsoft.com/kb/307394

    Version reporting back is on the list, except vista wich is 6.x.x.x.x (i belive it was, check it yourself since your using vista).

    Then, you need to check if it uses vista, does it have vista sp1 (for dx10.1).

    Then, you need to check wich hardware the user has, if vista sp1, does it support dx10.1 else it has to use dx10 if hw supports that, else dx9ex

     

    Oh and you also have to check wich version of directx (highest supportet) is installed (if users is on vista, on winxp highest supportet is dx9 anyways).

    But i dont see the point, its like "oh my god lets sell alot of hardware for the company's", and a new DX comes out every year wich requires new hardware to get something out of it.

     

    For now, ill only use DX9 and DX10, they can take DX10.1 and whatever else they are planning and showe it where the sun dont shine (sry but its really annoying).

    Its more work, alot more work, for programmers, will you use shader model 1_0, 2_0, 3_0, 4_0, 4_1 waaahtupppp! zzzzzz

    Nothing more fun then sitting around making shaders for a couple of years. 

     

    Just noticed your name! dangit, i been using NightMarez for like 8 years now, guess its time to make up a new name :) at some point anyways

    Knowledge is power, power corrupts. Study hard, be evil.!
  • 06-29-2008 9:07 AM In reply to

    Re: Supporting multiple D3D version

    Why not try to initialise the latest version (10.1), and if it fails, try initialising the second latest (10), then try D3D 9, and if it still fails report an error message and quit.
Page 1 of 1 (3 items) Previous Next