device create fails

I tried to run my d3d application on a computer with an on board graphic card - and as a result the create device fails.

I tried many to change the DeviceType, but it didn't help.
I tried changing the XVertexProcessing options. stiill no good.

What am i doing wrong
Thanks.



Answer this question

device create fails

  • spree

    If the SDK samples work then open one of them and step to see how they initialize the device (try BasicHLSL). Also run Caps Viewer and see what kind of device you have underneath...

  • MaximumBob

    Did you try the samples of the directx sdk . i thing you should compare the code of yours with that codes. maybe you'll find the problem. (but i dont't know directx well enough . dont trust me :) )

  • Chris DeHart

    Check the capabilities of the device. It could be that you're using an unsupported depth buffer format, multisampling, etc.


  • António Dias

    the Device constructor fails:

    m_PresentParameters = new PresentParameters();
    m_PresentParameters.Windowed = true;
    m_PresentParameters.SwapEffect = SwapEffect.Discard;
    m_PresentParameters.BackBufferHeight = m_RenderWindow.ClientSize.Height;
    m_PresentParameters.BackBufferWidth = m_RenderWindow.ClientSize.Width;

    m_Device = new Device(Manager.Adapters.Default.Adapter, DeviceType.Hardware, m_RenderWindow, CreateFlags.HardwareVertexProcessing | CreateFlags.MultiThreaded , m_PresentParameters);

    as you undersood from my code - i'm using managed D3D with C#.

    I wrote my application on a computer that has a grpahic card (Radeon X300) and it worked fine, when I tried to run the application on a computer with an on board graphic card it fails.

    I hope this post was more informative.


  • z2171999

    Well, "on board graphics card" is a good indicator of a potential problem -- your graphics chip isn't designed to handle what you're trying to do. The first thing to do is switch to the reference rasterizer. Is that works, then you know the culprit is your graphics chip.

    Hint: Most on-board graphics chips are suitable for 2D graphics and nothing more.



  • jim5400

    CreateFlags.HardwareVertexProcessing | CreateFlags.MultiThreded in the device instantiation caught my attention. Are you sure the card has these capabilities Perhaps setting CreateFlags.SoftwareVertexProcessing instead might help I remember from the C4F tutorials, before creating the device, we check the card capabilities and set the CreateFlags accordingly. The tutuorial has you create a Caps object to check the actual capabilities of the adapter and *then* set CreateFlags.



  • device create fails