Hello,
I had a strange problem, I had created a Windows Forms project in Visual Studio 2005. I render to this window using Managed Direct3D. I typically used 3 managed vertex buffers for rendering. When I try to resize the rendering window, The resizing operation was too fast and catching up my mouse pointer inspite of it's speed, This is good. But this happens only in Debug or in Release mode while Visual Studio is open!!. If I closed the Visual Studio and opened the application. The resizing operation will be too slow and really not good.
I removed the vertex buffers and just the rendering routine clear the screen, I mean there no overhead to do. These artifact also happened.
I tried this with the DirectX SDK and it happens there is too, The resizing is so slow if Visual Studio isn't opened.
I tried this in two fast computers also happens there. And I don't know what to do I don't like this resizing performance.
Thanks,
Mustafa ELBanna

Strange Problem In Resizing Managed Direct3D Window
Chris_Wilson
I think your instinct is right about the JIT compiler - the same JIT compiler would be used within and outside VS2005. If anything there is *more* stuff happening in VS2005, debuggers get loaded. MDAs are inserted into call chains etc.
Plus the way JIT compilation works, once a particular bit of code is run its in x86 form and isn't compiled again so given the lack of code paths in your simple repro cases most of your code will be fully compiled by the 1st time you try to resize.
jsc7810
Hello,
Thanks,
Mustafa ELBanna
John Warner
alehel
Are you trying to redraw/reset the device while you resize The SDK samples don't do that, they wait till the resize is complete. I imagine that slows things down, but I can't understand how it works in VS2005 but not outside.
(is this the 1st time anyone has ever heard of Visual Studio speeding things up !!!)
Franz Gsell
I had a logn chat with Mustafa on IRC tonight, the effect his seeing is that the window resize (the actual shape of the window) lags at least 1 second behind his mouse pointer. But *only* when he runs the EXE. If he runs the source code from within Visual Studio it works fine. It happens on any code using Managed DirectX. The SDK samples, the SDK tutorials and his own code. It doesn't happen with the native code he has written (Mustapha - can you try running the native SDK samples and let us know)
I got him to comment lines out in tutorial1 and recompile until it stopped happening. Once he had commented out the device creation the window went back to normal.
He says it happens on 3 machines, with 2 different graphics cards.
I got him to check if he is running any background tools that use DirectX on all 3 - he is not.
I am officially out of ideas - he's asked in gamedev too http://www.gamedev.net/community/forums/topic.asp topic_id=373356 maybe someone else has seen this one.
Rogma
Patrick ODay
Make sure you are setting the style of the control to AllPaintingInWmPaint and Opaque.
Update DirectX SDK to at least the August 2005 release if not the December 2005 release.
ChrisEck
Hello,
Thanks,
Mustafa ELBanna
yda
Hello,
Thanks,
Mustafa ELBanna
Erez Mor
I am running Dx 9.0c with VS2k5 and I have no problems resizing in and out of the IDE. I see some minor flickering but nothing skips. Perhaps you are trying to reset way too many objects, or maybe there is some bottle neck on the Device Reset/Lost event
Hope this helps,
John