Re: [AD] loss of videoBitmap after set_gfx_mode()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Gillius wrote:

No. That's right. At least for Windows. Video bitmaps are stored in the
video card/DirectX.  When you switch graphics modes, you are essentially
restarting DirectX, so anything that you had going related to DirectX is
lost.


Yes - I completely agree. However, this does not mean that Allegro should *crash* because the surfaces were lost. Allegro already keeps track of video bitmaps (at least, it does on DOS and Windows). Couldn't it safely destroy them on each call to set_gfx_mode?

Also, I don't beleive this feature is documented anywhere.

I guess right now it's a debate in between making Allegro crash-resistent/user-proof (as much as possible), versus leaving it up to the coder to RTFM.

Maybe we can somehow signal this in the debug build instead? That way, the release build is unaffected, and the debug build gets to warn the coder about bad behavior...





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/