JeremyAtGosub

I'm using C# and MDX. When I setup DirectX to go full screen, and then also use GDI to draw on another form on a different display, the Present() function can hang for 10 seconds. When it hangs, even the mouse pointer stops moving. When it comes back to life and I click on a form, it looks like GDI is resetting or something (the monitor goes black for a few seconds, then redraws), and sometimes there is junk on one of the displays. Sometimes it hangs forever, and I have to do a hardware reset to fix the problem.

Changing PresentInterval to Immediate fixes the problem, but I'd prefer to have DirectX do the vertical sync for me.

Any ideas

Thanks,

Jeremy



Re: Game Technologies: Graphics Present() hangs for 10 seconds when mixing DirectX full screen and GDI

Wessam Bahnassi

Does this happen with the Managed DirectX SDK samples also




Re: Game Technologies: Graphics Present() hangs for 10 seconds when mixing DirectX full screen and GDI

JeremyAtGosub

Probably not, since they don't do that. Maybe some day I'll hack one up to see if it does. My guess is that it's related to DirectX (and how it handles vsync in full screen mode) and not MDX.

-Jeremy





Re: Game Technologies: Graphics Present() hangs for 10 seconds when mixing DirectX full screen and GDI

JeremyAtGosub

> Does this happen with the Managed DirectX SDK samples also

YES!!! Deader than a door nail - forever. It's very easy to reproduce. Make a visual C# application, add a label1 and a button1, then add the following code to the button click event:

private void button1_Click(object sender, EventArgs e)
{
int a = 0;
label1.Font = new Font("Arial", 24, FontStyle.Regular);
while (true)
{
a++;
label1.Text = "Hello: " + a;
Application.DoEvents();
}
}

Run the application, move the window over to the other monitor, and then click button1. Now run the BasicHLSL (managed) DirectX example from the Dec 2006 SDK. Switch to full screen, wait a few seconds, and poof - dead.

-Jeremy






Re: Game Technologies: Graphics Present() hangs for 10 seconds when mixing DirectX full screen and GDI

JeremyAtGosub

I tried to reproduce this on another system, and I couldn't:

Dell Dimension DIM9100, Radeon X300 SE 128MB - DirectX example works.

Dell Inspiron 8500, NVIDIA GeGorce4 4200 - DirectX example hangs.

-Jeremy





Re: Game Technologies: Graphics Present() hangs for 10 seconds when mixing DirectX full screen and GDI

Wessam Bahnassi

Sounds like an nividia driver issue to me.