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

How to disable 3D device caps ?

Last post 15/11/2009 19:26 by Erida Samojlova. 1 replies.
  • 06/11/2009 18:48

    How to disable 3D device caps ?

    Hello everybody!

    Here's my problem:

    I'm currently developping a game using a 3D device (GeForce 7600GS) which has some 3D capabilities. This card runs my game flawlessly.
    Some beta testers are testing my game with different 3D devices and old cards can't run my game because they are missing some caps.

    I'm updating my game to make those older 3D devices compatible.
    Unfortunately, i can only test my game with my 3D device and i don't want to release the new version to the beta testers without having tested it before on older 3D devices.

    So my question is:
    Do you know if there's a way to disable some capabilities of my 3D device to check if the new version of my game fix the problem of older devices?

    In my case, the capabilities are D3DPTEXTURECAPS_POW2 (SupportsPower2 in C#) and D3DPTEXTURECAPS_NONPOW2CONDITIONAL (SupportsNonPower2Conditional in C#).

    If i can disable both capabilities, i will be sure i wouldn't have missed something in my code.

    Thank you for your help
  • 15/11/2009 19:26 In reply to

    Re: How to disable 3D device caps ?

    Don't disable, just don't use it.
    Use simple condition in functions.
    Let's imagine __OLDCARD is a symbol for debugging purpose. For debug just define it with #define __OLDCARD

    void SomeFunc()
    {
    #ifndef __OLDCARD
      if ( m_DevCaps.TextureCaps & D3DPTEXTURECAPS_POW2 )
      {
        // Card has capabilities
        // Insert code for new card
      }
      else

    #endif
      {
        // It's old card or we need debug
        // Insert code for old card
      }
    }

Page 1 of 1 (2 items) Previous Next