-------------------------------------------------------------------------------- Hello, here is my problem: Im making a 3D application using the openGL API. On some drivers leaving the textures in memory work fine. On others when comming back with ALT-TAB everyting stills work fine, except for the fact than instead of having textures everything is WHITE, thus the textures are not saved in some drivers after an ALT-TAB. To prevent this problem and to make room for other applications I release all the textures when I get the ALT-TAB occurs and reload them when the focus is gain. This seem to work fine except that it takes some time to decompress and reload the textures. I dont mind this when the user uses ALT-TAB or when it presses CTRL-ALT-DELETE, but, its very anoying when a program as ICQ or yahoo messanger, steals the focus. I wish to give the user the option of not switching in this situations. Basically the question is: What are the ways to prevent the window from loosing focus?
Posted on 2001-07-01 16:17:00 by dxantos
DirectDraw maybe...i belive you can use DirectDraw to setup a full screen OpenGL window... But i confess : this kinda problems that OpenGL has with Windows makes me use DirectX...its much better integrated/supported with Windows ;) and the problem is not from the drivers ;) its a standard mode of operation for video boards... depends on how many RAM the videoboard has and how many textures you have loaded into it... only system memory based textures are preserved ... the rest are discarded because video board needs them for WIndows GDI screen or DirectX Aplications You must RELOAD all textures and restore all surfaces (eh restore surfaces only in D3D ;) ) on Alt+Tab. One method of making this fast is to load them as bitmaps into system memory and keep the handles (Hbmp) for each of them... then just GDI blit them back (dont reload them from HDD)
Posted on 2001-07-01 17:38:00 by BogdanOntanu
thank you!
Posted on 2001-07-02 11:40:00 by dxantos
A window is notified just before it loses focus, you could try forcing the Window TOPMOST with SetWindowLong and after the other Window has done its thing to SetWindowLong with NOTTOPMOST plus something to restore the focus
Posted on 2001-07-02 14:50:00 by Chris