<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>[A5] al_get_new_display_option</title>
		<link>http://www.allegro.cc/forums/view/606233</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 30 Jan 2011 05:38:37 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi,</p><p>I&#39;m trying to query the maximum loadable bitmap size, but not having any luck. I&#39;m using:</p><div class="source-code snippet"><div class="inner"><pre>maxBmp <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_new_display_option"><span class="a">al_get_new_display_option</span></a><span class="k2">(</span>ALLEGRO_MAX_BITMAP_SIZE, <span class="k3">&amp;</span>importance<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

The documentation says that when queried, ALLEGRO_MAX_BITMAP_SIZE returns both the maximum width and height, but the <span class="source-code"><a href="http://www.allegro.cc/manual/al_get_new_display_option"><span class="a">al_get_new_display_option</span></a></span> function only returns one integer?  Is the other size returned in importance? Or am I totally trying to do this the wrong way.</p><p>The reason I&#39;m trying to figure this out is because I have two separate programs in which I try to load the same image.  In one program, the image loads fine.  In the other, it does not load.  I am trying to figure out if perhaps the image is too large to load because of different display sizes?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (wiseguy)</author>
		<pubDate>Sun, 30 Jan 2011 03:39:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I would assume the returned size is both the height and width. e.g. 512 would be 512x512.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sun, 30 Jan 2011 04:12:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That&#39;s what I was thinking as well, but when I called the function it returned 0.  On a side note, I switched the application back to a windowed display mode and the bitmap loaded correctly.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (wiseguy)</author>
		<pubDate>Sun, 30 Jan 2011 04:14:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Does <span class="source-code"><a href="http://www.allegro.cc/manual/al_get_display_option"><span class="a">al_get_display_option</span></a><span class="k2">(</span><span class="k2">)</span></span> work?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sun, 30 Jan 2011 04:18:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have a screen resolution of 800x600 in windowed mode, and calling <br />&lt;code&gt;<br />maxBmp = al_get_new_display_option(ALLEGRO_MAX_BITMAP_SIZE, 0);<br />&lt;code&gt;</p><p>sets maxBmp to 0.</p><p>Maybe I&#39;m just using it wrong.  I will try to look through the A5 source and see what I&#39;m missing.</p><p>[Edit]</p><p>Calling </p><div class="source-code snippet"><div class="inner"><pre>  maxBmp <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_display_option"><span class="a">al_get_display_option</span></a><span class="k2">(</span>scr, ALLEGRO_MAX_BITMAP_SIZE<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

sets maxBmp to 11.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (wiseguy)</author>
		<pubDate>Sun, 30 Jan 2011 04:32:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Maybe that means 2^11 or 2048x2048. I&#39;m just guessing. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sun, 30 Jan 2011 04:45:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Interesting. It also returns 11 on my old integrated Intel graphics card and it doesn&#39;t support creating a 2048x2048 bitmap.</p><p>It returns 11 when using D3D and won&#39;t create a 2048x2048 bitmap. Using OpenGL it returns 2048 and 2048x2048 bitmap creation works.</p><p>The maximum bitmap size on my card seems to be 1024x1024 when using D3D.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kenmasters1976)</author>
		<pubDate>Sun, 30 Jan 2011 04:59:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think you just found a bug in our D3D code.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 30 Jan 2011 05:01:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, so then I&#39;m not just totally doing this wrong? If I can help with testing anything on windows let me know.  On a side note, those function calls return the same numbers in both windowed and fullscreen mode, but the bitmap, which is 1824x1824, loads successfully in windowed mode.</p><p>[Edit]</p><p>Ok, interesting note:  The bitmap loads successfully if I load it using my &quot;load map&quot; routine, but only fails when using al_load_bitmap using the path from the native filechooser.  I am thinking this is probably more a problem on my end rather than a bug in allegro.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (wiseguy)</author>
		<pubDate>Sun, 30 Jan 2011 05:07:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606233/901044#target">Thomas Fjellstrom</a> said:</div><div class="quote"><p>I think you just found a bug in our D3D code.</p></div></div><p> Funny that no one found it before as it seems like something you&#39;d want to check in your code.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kenmasters1976)</author>
		<pubDate>Sun, 30 Jan 2011 05:34:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Whenever those display options became retrievable, nobody bothered to update the direct3d code to handle them.</p><p>Since sourceforge won&#39;t reset my password, I can&#39;t commit a fix right now but here&#39;s a patch.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Sun, 30 Jan 2011 05:38:37 +0000</pubDate>
	</item>
</rss>
