OpenGL and "Lost devices"

BlitzMax Forums/OpenGL Module/OpenGL and "Lost devices"

Sweenie(Posted 2005) [#1]
How do I know when the resources I sent to the gfxcard has become invalid, like when I Alt-Tab from a fullscreen window.

In DirectX I can detect if the device is lost, reset it and send all the lost data to the card again.

But how does this work when using OpenGL?


Perturbatio(Posted 2005) [#2]
if they are invalid, they should = null shouldn't they?


Sweenie(Posted 2005) [#3]
I stumbled upon an article there they compared DirectX & OpenGL.
According to that article OpenGL users doesn't need to worry about this as it's handled by the GL drivers.
Sure hope that's true.


Perturbatio(Posted 2005) [#4]
maybe a test is in order?

*EDIT*
Alt+TABbing from a test program in fullscreen and then back didn't affect the redrawing of the images I used, not a comprehensive test, but a good sign.


xlsior(Posted 2005) [#5]
Alt+TABbing from a test program in fullscreen and then back didn't affect the redrawing of the images I used, not a comprehensive test, but a good sign.


One of the earliest released of the Windows Beta did mess up the screen on ALT-TAB, one of the updates fixed that problem so it now appears to work OK.


ozak(Posted 2005) [#6]
OpenGL will keep copies of textures etc. in system memory and reload accordingly. DirectX users are in for bloody hell as bad drivers fail to report that your resources are gone so you happily call null pointers etc :)