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

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


> 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.  Whether that's the desired behavior or not is a different matter,
> but the fact that he lost video bitmaps makes perfect sense from an
> implementation standpoint.

Yep. The root DirectDraw object is destroyed on each gfx mode shutdown, in 
particular on each call to set_gfx_mode(), so all DirectDraw surfaces are 
destroyed as well.

I think Allegro is right here: since video bitmaps are deeply tied to the 
screen, calling set_gfx_mode() (which destroys the screen) is implicitly 
allowed to destroy the video bitmaps.

The only problem I see is the "implicitly": we should probably document the 
behavior if it hasn't been documented yet.

-- 
Eric Botcazou



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