<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>ex_resize</title>
		<link>http://www.allegro.cc/forums/view/618421</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 24 May 2021 23:14:36 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Quick question - in <span class="source-code">ex_resize</span>, is the A supposed to fit exactly in the window?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Hull)</author>
		<pubDate>Mon, 24 May 2021 01:27:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="https://github.com/liballeg/allegro5/blob/master/examples/ex_resize.c">https://github.com/liballeg/allegro5/blob/master/examples/ex_resize.c</a></p><div class="source-code snippet"><div class="inner"><pre>w <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_bitmap_width"><span class="a">al_get_bitmap_width</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_get_target_bitmap"><span class="a">al_get_target_bitmap</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
h <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_bitmap_height"><span class="a">al_get_bitmap_height</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_get_target_bitmap"><span class="a">al_get_target_bitmap</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_draw_line"><span class="a">al_draw_line</span></a><span class="k2">(</span><span class="n">0</span>, h, w <span class="k3">/</span> <span class="n">2</span>, <span class="n">0</span>, black, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_draw_line"><span class="a">al_draw_line</span></a><span class="k2">(</span>w <span class="k3">/</span> <span class="n">2</span>, <span class="n">0</span>, w, h, black, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_draw_line"><span class="a">al_draw_line</span></a><span class="k2">(</span>w <span class="k3">/</span> <span class="n">4</span>, h <span class="k3">/</span> <span class="n">2</span>, <span class="n">3</span> <span class="k3">*</span> w <span class="k3">/</span> <span class="n">4</span>, h <span class="k3">/</span> <span class="n">2</span>, black, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

So the answer is yes, the two feet of the A are the bottom left and right corners exactly and the top is at the very top.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 24 May 2021 04:54:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I ask because, yes it does on Linux but not on MacOS. It seems like if you resize the window, it re-scales the GL context so that it has the same size as the original (100x100 in this case)</p><p><a href="https://www.allegro.cc/files/attachment/612969">https://www.allegro.cc/files/attachment/612969</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Hull)</author>
		<pubDate>Mon, 24 May 2021 12:43:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hm, yeah, my first guess would be that al_resize_display() does not work correctly under MacOS.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 24 May 2021 22:54:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>These functions get called:</p><ol><li><p>`al_resize_display` (cross-platform) calls...
</p></li><li><p>`resize_display_win` (mac specific) calls...
</p></li><li><p>`resize_display_win_main_thread` (mac specific) calls...
</p></li><li><p>`acknowledge_resize_display_win_main_thread` (mac specific) calls...
</p></li><li><p>`setup_gl` (mac specific) calls...
</p></li><li><p>`_al_ogl_setup_gl` (cross-platform) calls...
</p></li><li><p>`_al_ogl_resize_backbuffer` (cross-platform)</p></li></ol><p>and in <span class="source-code">_al_ogl_resize_backbuffer</span> it sets up a transformation involving the width and height. It&#39;s very confusing. I think the next step is to trace the same call on X11 and see where it differs - unless you can jump straight to the solution!?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Hull)</author>
		<pubDate>Mon, 24 May 2021 23:14:36 +0000</pubDate>
	</item>
</rss>
