<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Transparent back buffer.</title>
		<link>http://www.allegro.cc/forums/view/614595</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 28 Aug 2014 09:02:07 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;d like to make the display / back buffer transparent, all of the solutions I found on this were for Allegro 4 except for one:</p><div class="source-code snippet"><div class="inner"><pre>  SetWindowLong<span class="k2">(</span><a href="http://www.allegro.cc/manual/al_get_win_window_handle"><span class="a">al_get_win_window_handle</span></a><span class="k2">(</span>display<span class="k2">)</span>, GWL_EXSTYLE, GetWindowLong<span class="k2">(</span><a href="http://www.allegro.cc/manual/al_get_win_window_handle"><span class="a">al_get_win_window_handle</span></a><span class="k2">(</span>display<span class="k2">)</span>, GWL_EXSTYLE<span class="k2">)</span> <span class="k3">|</span> WS_EX_LAYERED<span class="k2">)</span><span class="k2">;</span>
  SetLayeredWindowAttributes<span class="k2">(</span><a href="http://www.allegro.cc/manual/al_get_win_window_handle"><span class="a">al_get_win_window_handle</span></a><span class="k2">(</span>display<span class="k2">)</span>, <span class="n">0</span>, <span class="n">0</span>, LWA_ALPHA<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

Problem with this one is that it makes the entire window transparent, so anything I draw is also transparent.</p><p>And it will only run on Windows, which isn&#39;t the worst thing even though I&#39;m planning on having my program be cross platform compatible. It just means I&#39;ll have to spend some more time looking at X11 and whatever mac uses.</p><p>To sum it up:<br />Is there a way to make my back buffer transparent so that the desktop is visible?<br />Like this:
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/al_clear_to_color"><span class="a">al_clear_to_color</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_map_rgba"><span class="a">al_map_rgba</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="c">//draw stuff</span>
<a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gnamra)</author>
		<pubDate>Sun, 24 Aug 2014 18:05:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think what you want is <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms633556%28v=vs.85%29.aspx">UpdateLayeredWindow</a>, but I don&#39;t think you can vary the alpha over different parts of the window, just set a transparency level for the whole window.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 25 Aug 2014 02:13:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was able to solve my problem but I had to give up on Allegro.</p><p>I used the <a href="http://www.dhpoware.com/demos/glLayeredWindows.html">glLayeredWindows</a> demo to handle all of the drawing for me and modified it so I could put it in a class and use it in my project.</p><p>I also used <a href="http://lodev.org/lodepng/">lodepng</a> to load the png files I&#39;m using in my project.</p><p>I hope this will make it easier for others who wish to do the same.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gnamra)</author>
		<pubDate>Thu, 28 Aug 2014 06:51:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>This is indeed a missing Allegro feature. Transparent windows are possible on Linux and Windows, (and likely OSX) so we should probably implement this... one day. </p><p> <br /><a href="http://stackoverflow.com/questions/9363491/how-to-make-transparent-window-on-linux">http://stackoverflow.com/questions/9363491/how-to-make-transparent-window-on-linux</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (beoran)</author>
		<pubDate>Thu, 28 Aug 2014 09:02:07 +0000</pubDate>
	</item>
</rss>
