Re: Can't create Device

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Fredo (fredo68_at_hotmail.com)
Date: 11/02/04


Date: Mon, 1 Nov 2004 18:03:46 -0600

Okay, well, my Manager.Adapters issue seemed to be solved simply by
upgrading to the latest version of the DirectX SDK. Now that part runs in
debug and release runtimes just fine.

I still can't create the Device object. Running with the debug runtime
provides me with no additional information as to why the Device constructor
is throwing a InvalidCallException.

So here's some additional information and hopefully you can help me narrow
down the exact cause.

My original suspicion was that I was running into a problem because the
format of my backbuffer wasn't matching the desktop format. But there are
only two formats on this display adapter (X8R8G8B8 or R5G6B5). Neither of
which works at a number of resolutions that I've tried.

For now, I'm trying to do full-screen, which as I'm looking back at my
original post, I omitted, but I'm setting presParams.Windowed = false.

I mention this because the D3DApp.cs sample sets
presentParams.FullScreenRefreshRateInHz to 0 in windowed mode and to a real
refresh rate value when in full screen. I wasn't doing that, so I added
that.

It sets a number of other parameters that I'm not interested in. Do I have
to set every single parameter? Again, apart from the D3DApp as an example,
none of the sources I've seen seem to indicate that I need to set any other
parameters.

Passing in the present parameters structure directly or in an array of
present parameters as the last parameter of the Device constructor call
seems to make no difference. I mention this because the documentation states
it should be an array of present parameters, but the sample app and the
books I have, pass it in as simply the structure, but I suspect this is
simply a feature of C# that I was previously unaware of (the ability to
convert a parameter to an array of its type if needed).

So, I'm back to where I was in my original message. Stuck.

Pete



Relevant Pages

  • Re: graphics card problems
    ... are you using the Check methods to make sure that format ... >> what does the debug runtime output say? ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Proper way to "foreach" through a two dimensional array?
    ... > 4) Learn how to debug scripts!!! ... > debug scripts. ... > $Varibl was an Array. ... > You had done the foreach on the 2D array wrong. ...
    (alt.php)
  • Re: Runs on Windows, fails on Linux
    ... > the windows program WITHOUT debug, and guess what, I'm getting the same ... > simply get properly sorted values back with debug, ... 16 MB ints) under Linux on three different machines (sorry, ... I did check the results by iterating over the sorted array and never ...
    (comp.os.linux.development.apps)
  • RE: undefined...
    ... it is my bad with the explanation... ... I used print statements and didn't seem to notice this problem... ... > I have a piece of code which generates array of arrays which then is used to call the ... > Does someone has some suggestions as to how to debug this? ...
    (perl.beginners)
  • Re: Moderation update
    ... Programmes in free format languages are often written with indentation ... Or perhaps when you add debug ...
    (uk.religion.christian)