<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Creating mouse cursor</title>
		<link>http://www.allegro.cc/forums/view/613287</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 28 Sep 2013 22:22:36 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have four mouse cursors that I am using for an app. By adding these cursors, my load time has increased from 1/2 second to 5 to 6 seconds.</p><p>I added this code to see how long it takes to create a cursor.
</p><div class="source-code snippet"><div class="inner"><pre>time_t begin<span class="k2">;</span>
time_t end<span class="k2">;</span>

<a href="http://www.delorie.com/djgpp/doc/libc/libc_821.html" target="_blank">time</a><span class="k2">(</span> <span class="k3">&amp;</span>begin <span class="k2">)</span><span class="k2">;</span>

cursor <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_mouse_cursor"><span class="a">al_create_mouse_cursor</span></a><span class="k2">(</span> bmp, x, y <span class="k2">)</span><span class="k2">;</span>

<a href="http://www.delorie.com/djgpp/doc/libc/libc_821.html" target="_blank">time</a><span class="k2">(</span> <span class="k3">&amp;</span>end <span class="k2">)</span><span class="k2">;</span>

<span class="k1">double</span> p <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_131.html" target="_blank">difftime</a><span class="k2">(</span> end, begin <span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

Here is the results when I outputted them to a log file.</p><p>Time: 2<br />Time: 1<br />Time: 0<br />Time: 1
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (DanielH)</author>
		<pubDate>Mon, 23 Sep 2013 06:49:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Try loading these bitmaps as memory bitmaps... will save a roundtrip to the GPU. Also, using <span class="source-code"><a href="http://www.allegro.cc/manual/al_get_time"><span class="a">al_get_time</span></a></span> will yield you more accurate timing info than <span class="source-code"><a href="http://www.delorie.com/djgpp/doc/libc/libc_821.html" target="_blank">time</a></span>...</p><p>Also, what is your OS?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Sat, 28 Sep 2013 22:22:36 +0000</pubDate>
	</item>
</rss>
