Re: Can't create Device
From: Fredo (fredo68_at_hotmail.com)
Date: 11/01/04
- Next message: Phil Taylor: "Re: Can't create Device"
- Previous message: Eran Kampf: "Re: Combining rotation matrices"
- In reply to: Phil Taylor: "Re: Can't create Device"
- Next in thread: Phil Taylor: "Re: Can't create Device"
- Reply: Phil Taylor: "Re: Can't create Device"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 1 Nov 2004 13:32:23 -0600
I'm sorry, I thought I was fairly clear about why I can't use the debug
runtime:
"Some curious issues I also noticed. I tried to use the Debug build of
DirectX, but then I get a null reference exception in the call to
Manager.Adapters property."
and then again in my second post:
"And why does using the Debug runtime cause Manager.Adapters to return
a null?"
I mean, I suppose for trying to resolve this particular bug, I could remove
the code that depends on Manager.Adapters, but to run the overall system, I
need Manager.Adapters, so the debug build is going to have very limited use
for me in testing my app if Manager.Adapters is always going to return null,
even if I get past this one bug by removing it.
I'm sure this isn't going to be the only DirectX problem I run into.
Pete
"Phil Taylor" <philipt@private-citizen-sorta.com> wrote in message
news:uoaBZFEwEHA.1148@TK2MSFTNGP12.phx.gbl...
> you dont say why you cant use the debug runtime. reconsider. the debug
> runtime is the most single valuable resource to the DX developer. install
> it, turn the debug level up, enable unmanaged debugging, and examine the
> debug runtime OutputDebugString debugging comments in the output pane of
VS.
> that will help.
>
> there is no reason you cant use the D3D initialization code, I do not
> believe there is a licensing issue as long as you make 1 single change.
>
> the reason theirs works and yours doesnt is clearly a bug in your code. we
> are trying to help you debug it by asking questions and helping you thru
the
> process. saying you cant use a major part of the process ( debug runtime )
> does not help your cause.
>
> does any sample use Manager.Adapters? if so, step thru it with the
debugger
> and see what it does in a different code chunk to compare to yours.
>
> "Fredo" <fredo68@hotmail.com> wrote in message
> news:M6Gdnfydp6QY9xvcRVn-sg@giganews.com...
> >I can't use the debug runtime, see the end of my original post regarding
> > that issue.
> >
> > The samples work, but they use a fairly complex initialization within
> > D3DApp.cs in the Common folder. I can't use that in my own code for
> > licensing reasons.
> >
> > So, I guess the two questions are: Why does their's work and why doesn't
> > mine? And why does using the Debug runtime cause Manager.Adapters to
> > return
> > a null?
> >
> > Pete
> >
> > "Phil Taylor" <philipt@private-citizen-sorta.com> wrote in message
> > news:OKqfuJDwEHA.1292@TK2MSFTNGP10.phx.gbl...
> >> do the samples work?
> >>
> >> does the debug runtime provide any debug output to read and chew on?
> >>
> >> can you copy initialization code from the samples and get it to work?
> >>
> >> "Fredo" <fredo68@hotmail.com> wrote in message
> >> news:aridnVJhEqMl_BjcRVn-qQ@giganews.com...
> >> > I'm using DirectX Summer 2003 Update.
> >> >
> >> > When trying to create a Device, I get an InvalidCall exception.
> >> >
> >> > My code is basically:
> >> >
> >> > presParams.BackBufferCount = 1;
> >> > presParams.BackBufferFormat = dgm.Format; // Tried a number of
> > different
> >> > formats here
> >> > presParams.BackBufferWidth = 640;
> >> > presParams.BackBufferHeight = 480;
> >> > presParams.DeviceWindow = parentControl;
> >> > PresentParameters[] ppa = new PresentParameters[1];
> >> > ppa[0] = presParams;
> >> > device = new Device(0,
> >> > DeviceType.Software,
> >> > parentControl,
> >> > CreateFlags.SoftwareVertexProcessing,
> >> > ppa);
> >> >
> >> >
> >> > Now, I've tried passing ppa and presParams as the last parameter. The
> >> > documentation says its an array, but I've seen samples where it's
not.
> >> >
> >> > dgm.Format is one of the formats retrieved from the
> >> > AdapterInfo.SupportedDisplayModes and is either X8R8G8B8 or R5G6B5 on
> >> > my
> >> > machine.
> >> >
> >> > parentControl is a System.Windows.Forms.Form
> >> >
> >> >
> >> > Some curious issues I also noticed. I tried to use the Debug build of
> >> > DirectX, but then I get a null reference exception in the call to
> >> > Manager.Adapters property.
> >> >
> >> > I tried setting other debug options from the DirectX control panel
app,
> >> > such
> >> > as the managed debug stuff, setting all the other debug info on full,
> > but
> >> > I
> >> > don't get any additional information, presumably because I can't use
> >> > the
> >> > debug build of DirectX. I don't know.
> >> >
> >> > Anyway, help on either or both of these issues would be greatly
> >> > appreciated.
> >> >
> >> > Fredo
> >> >
> >> >
> >>
> >>
> >
> >
>
>
- Next message: Phil Taylor: "Re: Can't create Device"
- Previous message: Eran Kampf: "Re: Combining rotation matrices"
- In reply to: Phil Taylor: "Re: Can't create Device"
- Next in thread: Phil Taylor: "Re: Can't create Device"
- Reply: Phil Taylor: "Re: Can't create Device"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|