<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Any way to make a transparent white primitive?</title>
		<link>http://www.allegro.cc/forums/view/618811</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 17 Apr 2023 11:20:58 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was trying to do a simple fade in fade out sort of thing with primitives, but it looks like <span class="source-code"><a href="http://www.allegro.cc/manual/al_map_rgba_f"><span class="a">al_map_rgba_f</span></a><span class="k2">(</span><span class="n">1</span>.<span class="n">0</span>, <span class="n">1</span>.<span class="n">0</span>, <span class="n">1</span>.<span class="n">0</span>, <span class="n">0</span>.<span class="n">5</span> <span class="k2">(</span>as an example<span class="k2">)</span><span class="k2">)</span></span> won&#39;t blend properly. I assume there&#39;s a better blending option that would make it work, but I&#39;m a bit concerned that it&#39;ll make the transparent parts of my bitmaps not blend properly either. Fading with black works, so I can always just do that, but I&#39;d love it if there is a way to do it with white.</p><p>(allegro 5 by the way)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Engired)</author>
		<pubDate>Mon, 17 Apr 2023 06:33:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s been awhile since I used Allegro, but my guess is it&#39;s an issue with the blending mode.</p><p><a href="https://www.allegro.cc/manual/5/al_set_blender">https://www.allegro.cc/manual/5/al_set_blender</a></p><p>It seems like you want a weighted average of the source and destination color, which starts at alpha 0 (no effect) to 1.0 (full white).</p><p>In that case I think you&#39;d want this:<br /><span class="source-code"><a href="http://www.allegro.cc/manual/al_set_blender"><span class="a">al_set_blender</span></a><span class="k2">(</span>ALLEGRO_ADD, ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA<span class="k2">)</span></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gillius)</author>
		<pubDate>Mon, 17 Apr 2023 10:39:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Works exactly as I wanted it to. Thanks for the help!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Engired)</author>
		<pubDate>Mon, 17 Apr 2023 11:20:58 +0000</pubDate>
	</item>
</rss>
