<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Runtime problem</title>
		<link>http://www.allegro.cc/forums/view/586947</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 14 Aug 2006 15:44:43 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve written an Allegro game for the Linux OS. It runs fast and without problems. Now I&#39;m going to compile this game for Windows. I could compile and link it successfully, but the game runs very slowly. I&#39;ve already tried to set GFX_DIRECTX instead of GFX_AUTODETECT_FULLSCREEN, but that didn&#39;t solve the problem. I hope somebody can help me.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kevin Adrian)</author>
		<pubDate>Wed, 09 Aug 2006 16:22:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Show code.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Wed, 09 Aug 2006 16:25:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I second Gnolam, but you could start with some things before:</p><p>Check your GFX driver, are they up to date ?<br />Check your DirectX version</p><p>Tell us:</p><p>Your windows version<br />The compiler you use<br />The allegro version</p><p>Make a virus scan (hé, you are under windows, you never know ;-) )</p><p>Thanks.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Thu, 10 Aug 2006 12:32:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OS: Windows98<br />Allegro version 4.1<br />Compiler Mingw32</p><p>I&#39;ve changed some things in my program, now it runs a little bit faster but even not satisfiable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kevin Adrian)</author>
		<pubDate>Fri, 11 Aug 2006 15:36:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>This should have noticeable effects : <span class="source-code"><a href="http://www.allegro.cc/manual/acquire_bitmap" target="_blank"><span class="a">acquire_bitmap</span></a><span class="k2">(</span><span class="k2">)</span></span>
</p><div class="quote_container"><div class="title">manual said:</div><div class="quote"><p>
locking a DirectDraw surface is very slow, so you will get much better performance if you acquire the screen just once at the start of your main redraw function, and only release it when the drawing is completely finished
</p></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Fri, 11 Aug 2006 17:19:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For better or worse. Used properly it may give you a boost, used improperly it will slow everything down (or worse).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 11 Aug 2006 17:22:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>My best guess, since you&#39;re switching from Linux to Windows, is that you&#39;re drawing each of your individual objects to the screen or a video bitmap without locking the memory using acquire_bitmap() and release_bitmap().</p><p>DirectX in Windows, like anything in Windows, does a ton of memory swapping, so in order to make large changes to a bitmap being accessed by the video card, it needs to lock the memory first, make its writes, then unlock it. Now, Allegro will do this locking and unlocking for you automatically, but will do it EVERY time you draw to a video memory surface if you haven&#39;t locked it manually.</p><p>So what you need to do is draw everything to a regular Allegro bitmap, then draw that bitmap to the screen each frame, OR put all your screen rendering code together, lock the screen, draw everything, unlock.</p><p>Be careful you don&#39;t do anything besides rendering between locking and unlocking a piece of video memory or the screen. If you do you could lock up or crash your program. (Or the system.)</p><p>--- Kris Asick (Gemini)<br />--- <a href="http://www.pixelships.com">http://www.pixelships.com</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kris Asick)</author>
		<pubDate>Sun, 13 Aug 2006 09:13:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thank you for your help. Now my game runs without problems.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kevin Adrian)</author>
		<pubDate>Mon, 14 Aug 2006 15:44:43 +0000</pubDate>
	</item>
</rss>
