<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Display lost/found state events never fired</title>
		<link>http://www.allegro.cc/forums/view/606904</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 01 Apr 2011 15:20:10 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi allegros,</p><p>I am looking forward to using the real fullscreen mode (ALLEGRO_FULLSCREEN and not ALLEGRO_FULLSCREEN_WINDOW). However, the way I understand Allegro will try to preserve bitmap textures under DirectX automatically. And this basically happens all the time when you toggle fullscreen/windowed mode under ALLEGRO_FULLSCREEN flag (you have to re-create your display). So essentially after switching to fullscreen mode you end up blitting from system memory to your video backbuffer (and that&#39;s slow).</p><p>I found a simple fix is to re-create all your bitmaps after fullscreen switch so they get placed in video memory again. But there is that unnecessary overhead from Allegro side (with that texture-preserve behaviour). So to remove it I found about <b>ALLEGRO_NO_PRESERVE_TEXTURE</b> bitmap flag and it seems to work great, display is lost from time to time and bitmap content is messed up - exactly what I expect.</p><p>The thing is that to restore bitmaps the docs state I should listed for the following events:</p><p><b>ALLEGRO_EVENT_DISPLAY_FOUND</b><br /><b>ALLEGRO_EVENT_DISPLAY_LOST</b></p><p>... and the problem is that they never appear on my event queue (display is obviously registered with it).</p><p>Is this a know Allegro bug? I am missing something in display creation code that would trigger these event from firing?</p><p><b>Edit:</b> Using Allegro 5.0.1
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (simast)</author>
		<pubDate>Fri, 01 Apr 2011 15:20:10 +0000</pubDate>
	</item>
</rss>
