- the (untransformed) vertices must be processed by software.
- the device must have lost its operational status (which happens when doing ALT + TAB).
Crash when doing fullscreen ALT+TAB
Hi folks!
I've got a really annoying problem which I am not able solve myself. I am almost as far to say that it might be a bug in the DirectX library or in the driver software but I don't have the experience to be sure.
Would be nice if someone could tell me his/her opinion about that problem.
Alright, actually I was working on my game when this problem occured. To find the "roots" of this error I wrote a simple application which displays only a single triangle. I was able to recreate the error with this programm.
The problem is described quite quickly: When the programm runs (in fullscreen) and the user presses ALT + TAB, it crashes with an access violation.
Please note that it crashes when Windows (WinXP on my machine) switches _from_ my application to desktop (or other processes) and not _to_ the application (so it can't have anything to do with "lost" resources like textures, etc).
But I think it must have something to do with the D3DDevice which got lost due to a task change.
I was able to track down the function that causes the access violation: It is the DrawPrimitive() method that is supposed to draw the triangle. But DXSDK-documentation says:
"The application can continue to call rendering methods, such as IDirect3DDevice8::DrawPrimitive() [when device is in lost state...] Internally, these operations are discarded until the device is reset to the operational state."
According to this it seems that it actually cannot be caused by the lost device. But I think it is somehow involved in that error because when I check for a "operational" device the crash can be avoided. Like this:
if SUCCEEDED(pDev->TestCooperativeLevel()) pDev->DrawPrimitive(bla);
Another thing I found out is that it only happens when I use untransformed vertices (without RHW component). Furthermore when the vertices are processed by hardware (with D3DCREATE_HARDWARE_VERTEXPROCESSING) the crash can be avoided.
Taking everything together I found out that two conditions must be fulfilled in order to summon the access violation:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement