GoldRunner

Hello,

I have a problem with running DirectX9 applications on Windows Vista (Release ver., Business ed.). I use latest DirectX SDK (February 2007) and can reproduce this problem on Tutorial 4: "Using Materials and Lights". I just compile and run this sample application. Just after the start, programm normally shows shaded tube, as it was expected. Then I try to resize it's window, device is being reset and after that all scene lighting turns off!!! (By this i mean that geometry object tude, which was correctly shaded before, now becomes absolutly black).

I tested the same tutorial application from SDK on several Vista machines and on several XP machines with the same version of DX (February 2007). This experiment has shown that bug appears on all VistaOS, but application works fine on WIndows XP. Additionally i found that some samples, which use DirectX.UtilityToolkit as a framework for DX applications, work fine on Vista, without turning lights off.

The problem i have is that I didn't found the reason of such behaviour and because of it I can't make my application work correctly on Vista. Please, help me to solve this problem.



Re: Game Technologies: Graphics DirectX9 on Windows Vista turns lighting off on device reset

Ralf Kornmann

This sounds like one of the common ˇ°invalid device state after resetˇ± problem. This happens from time to time even on XP based on the used driver. Therefore it is best praxis to make sure that the whole pipeline setup is done again after a reset. Unfortunatly not all samples follow this somewhat unofficial rule.






Re: Game Technologies: Graphics DirectX9 on Windows Vista turns lighting off on device reset

GoldRunner

Ralf,

I understand that device state is somehow became wrong, but I can't understand what certainly is wrong with it. I also forgot to say that i actually use Managed DirectX and write program on C#. According to my experiments this problem with device state after reset is constantly reproduced exactly on Windows Vista OS and even Microsoft sample shows it. Could you please provide more details on what is wrong exactly in this Microsoft sample in Vista environment

P.S: As I can see the lights are reinitialized in device reset event code here and are turned on in Rendering method. So what should be done else to make it work correctly




Re: Game Technologies: Graphics DirectX9 on Windows Vista turns lighting off on device reset

GoldRunner

Ralf,

I followed your advise and added full device initialization in reset event handler. In fact i added the creation of new device inside it, like during the application start. After that "lost of device state" disappeared, but application became working extremly slow in case of rendering viewport resizing. I need some other decision, which could solve the root cause of this proble. I need to understand what code makes Utility.Toolkit applications work correctly on Vista.