<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Toggle between fullscreen and windowed with alt+enter</title>
		<link>http://www.allegro.cc/forums/view/611606</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 12 Dec 2012 13:57:48 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>EDIT: Forgot to write that this is an Allegro 5 question (of course)!</p><p>Tried to add a check for keys ALT+ENTER which toggles between a fullscreen and a windowed display. The switch is made by destroying the current display and creating a new one but after doing that a lot of white rectangular artifacts are visible on screen and framerate goes down from 60 to less than 1. I guess something does not approve of this operation but what/why? All my loaded and drawn bitmaps are stored as video bitmaps, but feels like the are changed to memory bitmaps when the display is updated.</p><p>Anyone know what could be wrong, and/or even better how should this be done to keep performance.</p><p>Note that if I change to windowed/fullscreen between runs (and not while running) the application it work just fine without any visual errors and low framerate.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (TeaRDoWN)</author>
		<pubDate>Wed, 12 Dec 2012 12:06:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Recreate your bitmaps.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Wed, 12 Dec 2012 12:09:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Can&#39;t you just say <span class="source-code">al_upload_bitmaps<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></span><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 12 Dec 2012 12:23:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You can use <span class="source-code">al_convert_bitmaps</span> if you&#39;re using 5.1. See docs here: <a href="http://www.liballeg.org/a5docs/refman/graphics.html#al_convert_bitmap">http://www.liballeg.org/a5docs/refman/graphics.html#al_convert_bitmap</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Wed, 12 Dec 2012 12:44:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You can <span class="source-code"><a href="http://www.allegro.cc/manual/al_clone_bitmap"><span class="a">al_clone_bitmap</span></a></span> each one of them if you&#39;re using 5.0 IIRC. Just remember this takes twice the memory till you free the old bitmaps.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 12 Dec 2012 13:19:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>When you switch display modes, everything loaded into video memory will be lost. There are a number of ways to get around this (as you can tell from all of the above suggestions) but my recommendation is to actually clear and destroy all of your bitmaps manually before the switch, then do the switch, then reload and recreate them all. So long as the player hasn&#39;t been task switching and doing other things, everything that was previously loaded into video memory should still be cached and should reload very quickly.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kris Asick)</author>
		<pubDate>Wed, 12 Dec 2012 13:57:48 +0000</pubDate>
	</item>
</rss>
