<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Faster Translucent Effects?</title>
		<link>http://www.allegro.cc/forums/view/590399</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 07 Mar 2007 05:01:27 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m working on tuning up a program and a lot of the slow down comes from using draw_trans_sprite.  Is there any way I can speed this up w/o adding additional libraries.  As I said, I&#39;m working on tuning up a program, so I don&#39;t really want to add more libraries to it.  </p><p>I replaced one routine that drew a BLACK-filled bitmap to &quot;dim&quot; the screen with a simple draw_lit_sprite and noticed about 10fps increase!  Now I also have a 300 X 300 area being drawn via draw_trans_sprite and seems to really slow it down.  At home, my machine can easily pump 60+fps, but at work, on a 2.4GHz Celeron, she&#39;s lucky to go 30.</p><p>Am I sore out of luck?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 05 Mar 2007 23:14:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>#1 Profile, Benchmark.</p><p>#2 Give code. There are optimization guru there.</p><p>What else ? I do not know. You do not want additional library, so refer to #1
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Mon, 05 Mar 2007 23:27:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Tell us more about what kind of bitmap types and bitdepths are you using. <br />Could you possibly show some screenshots and describe how different areas are drawn there.</p><p>Would it be possible to make that small area to not being updated every frame?</p><p>[edit]</p><p>And yes, code would be nice. I&#39;m bored and I might provide you with some nice graphs, similar to what I showed <a href="http://www.allegro.cc/forums/thread/590346/654669#target">here</a>, assuming your program compiles and runs on Linux <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Mon, 05 Mar 2007 23:28:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Why no additional library? fblend depends only on Allegro.</p><p>At least look at the fblend code, because this style of speedup is the best you can do in software.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matt Smith)</author>
		<pubDate>Mon, 05 Mar 2007 23:35:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Tell us more about what kind of bitmap types and bitdepths are you using.
</p></div></div><p>
Oh, right right.  Everything is truecolor, color depth 32 bits.  (I&#39;m thinking of going to the wonderfull paletted world of 8-bit in the future  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> )</p><p>Screenshot:  I circled (in red) the area that is being translucent each frame.</p><p> <span class="remote-thumbnail"><span class="json">{"name":"591418","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/b\/3b54ab9457c82ace6d391f0061127ed3.jpg","w":645,"h":485,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/b\/3b54ab9457c82ace6d391f0061127ed3"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/3/b/3b54ab9457c82ace6d391f0061127ed3-240.jpg" alt="591418" width="240" height="180" /></span></p><p>The green blocks are <i>above</i> the water, floating, rippling the water.  The turned-off blocks are submerged under the water.  I&#39;ve got an option that turns off rippling the water all together, but it&#39;s still drawing it with translucency and the fps is just about the same.</p><p>[edit]
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Why no additional library? fblend depends only on Allegro.
</p></div></div><p>
Well, originally, I wanted to keep it as close to vanilla allegro as possible.  Plus, less libraries makes it less of a pain since I just supply the source to linux users. I&#39;ve heard many good things about fblend, I&#39;d just prefer to learn more about what I can do with what I have before adding more to it.  Am I making any sense?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 05 Mar 2007 23:40:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Am I making any sense?
</p></div></div><p>

No. You just have to take a look at fblend source to see how to achieve what you need.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Mon, 05 Mar 2007 23:51:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Oh, right right. Everything is truecolor, color depth 32 bits
</p></div></div><p>I hope you aren&#39;t using anything but regular bitmaps sitting in RAM.</p><p>How much rendering time is spent in drawing the translucent pixels? In percentages or in some other meaningful numbers?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Mon, 05 Mar 2007 23:53:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Allegro isn&#39;t going to get any faster with the blending routines despite what you do unless you forgo blending altogether. If you want faster blending you will need to look into a 3rd party options such as fblend.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (juvinious)</author>
		<pubDate>Mon, 05 Mar 2007 23:54:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
How much rendering time is spent in drawing the translucent pixels? In percentages or in some other meaningful numbers?
</p></div></div><p>
Well, if I take out both the water update and draw functions, back at home it would increase from about 60fps to 90fps.  Also, I don&#39;t draw each pixel under a translucent mode.  The pseudo-algorithm/logic of the water process is as follows</p><p>1)  Stretch background image to the container size (placed on bmp called bImage)<br />2)  Draw underwater bitmap onto bImage (the underwater bitmap is primarily magic pink, but objects get &quot;submerged&quot; onto it)<br />3)  Stretch a water surface image onto bTransfer, draw bTransfer translucently over bImage (this is mainly a blue image and becomes more and more solid as the game goes, making the water appear...deeper)<br />4)  Go through the WaveMap array, looking for non-zero values (meaning the water at that location is raised and/or lowered), _putpixel32 onto bImage using a spefic routine to figure out the color<br />5)  Stretch bImage onto bTransfer (bTransfer is the area of the red circled area on the screenshot above)<br />6)  Draw bTransfer using draw_trans_sprite, meshing with final buffer image, giving a glossy feel to the water (depending on what set_trans_blender is set to).</p><p>Steps 4 &amp; 6 are the main buggers of the algorithm, but on a high-end machine, the effect is rather aesthetic (in my opinion at least, haha).  </p><p>I took a look at fblend real quick.  If I can just steal this function (or use it somehow) without having link fblend all together, that might be a solution.  </p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="k1">static</span> <span class="k1">void</span> fblend_trans_32<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>src, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dst, <span class="k1">int</span> src_x, <span class="k1">int</span> src_y, <span class="k1">int</span> dst_x, <span class="k1">int</span> dst_y, <span class="k1">int</span> w, <span class="k1">int</span> h, <span class="k1">int</span> fact<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">2</td><td>&#160;</td></tr><tr><td class="number">3</td><td>  <span class="k1">if</span> <span class="k2">(</span>fact <span class="k3">=</span><span class="k3">=</span> <span class="n">128</span> <span class="k3">|</span><span class="k3">|</span> fact <span class="k3">=</span><span class="k3">=</span> <span class="n">127</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">4</td><td>       <span class="k1">int</span> i, j<span class="k2">;</span></td></tr><tr><td class="number">5</td><td>      </td></tr><tr><td class="number">6</td><td>    <span class="k1">for</span> <span class="k2">(</span>j <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> j <span class="k3">&lt;</span> h<span class="k2">;</span> j<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">7</td><td>&#160;</td></tr><tr><td class="number">8</td><td>      <span class="k1">unsigned</span> <span class="k1">long</span> <span class="k3">*</span>s, <span class="k3">*</span>d<span class="k2">;</span></td></tr><tr><td class="number">9</td><td>      <span class="k1">unsigned</span> <span class="k1">long</span> color1, color2<span class="k2">;</span></td></tr><tr><td class="number">10</td><td>    </td></tr><tr><td class="number">11</td><td>      <span class="c">/* Read src line */</span>      </td></tr><tr><td class="number">12</td><td>      bmp_select<span class="k2">(</span>dst<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">13</td><td>      s <span class="k3">=</span> <span class="k2">(</span><span class="k1">unsigned</span> <span class="k1">long</span><span class="k3">*</span><span class="k2">)</span><span class="k2">(</span>src-&gt;line<span class="k2">[</span>src_y <span class="k3">+</span> j<span class="k2">]</span> <span class="k3">+</span> src_x <span class="k3">*</span> <span class="k1">sizeof</span><span class="k2">(</span><span class="k1">long</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>      d <span class="k3">=</span> <span class="k2">(</span><span class="k1">unsigned</span> <span class="k1">long</span><span class="k3">*</span><span class="k2">)</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/bmp_write_line" target="_blank"><span class="a">bmp_write_line</span></a><span class="k2">(</span>dst, dst_y <span class="k3">+</span> j<span class="k2">)</span> <span class="k3">+</span> dst_x <span class="k3">*</span> <span class="k1">sizeof</span><span class="k2">(</span><span class="k1">long</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">15</td><td>        </td></tr><tr><td class="number">16</td><td>      <span class="k1">for</span> <span class="k2">(</span>i <span class="k3">=</span> w<span class="k2">;</span> i<span class="k2">;</span> i--<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">17</td><td> </td></tr><tr><td class="number">18</td><td>        <span class="c">/* Read data, 1 pixel at a time */</span></td></tr><tr><td class="number">19</td><td>        color2 <span class="k3">=</span> <span class="k3">*</span>s<span class="k2">;</span></td></tr><tr><td class="number">20</td><td>        color1 <span class="k3">=</span> <span class="k3">*</span>d<span class="k2">;</span></td></tr><tr><td class="number">21</td><td>&#160;</td></tr><tr><td class="number">22</td><td>        <span class="k1">if</span> <span class="k2">(</span>color2 <span class="k3">=</span><span class="k3">=</span> <a href="http://www.allegro.cc/manual/MASK_COLOR_32" target="_blank"><span class="a">MASK_COLOR_32</span></a><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">23</td><td>          s<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">24</td><td>          d<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">25</td><td>          <span class="k1">continue</span><span class="k2">;</span></td></tr><tr><td class="number">26</td><td>        <span class="k2">}</span></td></tr><tr><td class="number">27</td><td>&#160;</td></tr><tr><td class="number">28</td><td>        color1 <span class="k3">=</span>  <span class="k2">(</span><span class="k2">(</span>color1 <span class="k3">&amp;</span> <span class="n">0xFEFEFE</span><span class="k2">)</span> <span class="k3">&gt;</span><span class="k3">&gt;</span> <span class="n">1</span><span class="k2">)</span></td></tr><tr><td class="number">29</td><td>            <span class="k3">+</span> <span class="k2">(</span><span class="k2">(</span>color2 <span class="k3">&amp;</span> <span class="n">0xFEFEFE</span><span class="k2">)</span> <span class="k3">&gt;</span><span class="k3">&gt;</span> <span class="n">1</span><span class="k2">)</span></td></tr><tr><td class="number">30</td><td>            <span class="k3">+</span> <span class="k2">(</span>color1 <span class="k3">&amp;</span> color2 <span class="k3">&amp;</span> <span class="n">0x010101</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">31</td><td>&#160;</td></tr><tr><td class="number">32</td><td>         <span class="c">/* Write the data */</span></td></tr><tr><td class="number">33</td><td>        s<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">34</td><td>        bmp_write32<span class="k2">(</span><span class="k2">(</span><span class="k1">unsigned</span> <span class="k1">long</span><span class="k2">)</span>d, color1<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">35</td><td>        d<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">36</td><td>      <span class="k2">}</span></td></tr><tr><td class="number">37</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">38</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">39</td><td>  <span class="k1">else</span> <span class="k2">{</span></td></tr><tr><td class="number">40</td><td>      <span class="k1">int</span> i, j<span class="k2">;</span></td></tr><tr><td class="number">41</td><td>&#160;</td></tr><tr><td class="number">42</td><td>    <span class="k1">for</span> <span class="k2">(</span>j <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> j <span class="k3">&lt;</span> h<span class="k2">;</span> j<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">43</td><td>&#160;</td></tr><tr><td class="number">44</td><td>      <span class="k1">unsigned</span> <span class="k1">long</span> <span class="k3">*</span>s, <span class="k3">*</span>d<span class="k2">;</span></td></tr><tr><td class="number">45</td><td>      <span class="k1">unsigned</span> <span class="k1">long</span> color1, color2<span class="k2">;</span></td></tr><tr><td class="number">46</td><td>  </td></tr><tr><td class="number">47</td><td>      <span class="c">/* Read src line */</span></td></tr><tr><td class="number">48</td><td>      </td></tr><tr><td class="number">49</td><td>      bmp_select<span class="k2">(</span>dst<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">50</td><td>      s <span class="k3">=</span> <span class="k2">(</span><span class="k1">unsigned</span> <span class="k1">long</span><span class="k3">*</span><span class="k2">)</span><span class="k2">(</span>src-&gt;line<span class="k2">[</span>src_y <span class="k3">+</span> j<span class="k2">]</span> <span class="k3">+</span> src_x <span class="k3">*</span> <span class="k1">sizeof</span><span class="k2">(</span><span class="k1">long</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">51</td><td>      d <span class="k3">=</span> <span class="k2">(</span><span class="k1">unsigned</span> <span class="k1">long</span><span class="k3">*</span><span class="k2">)</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/bmp_write_line" target="_blank"><span class="a">bmp_write_line</span></a><span class="k2">(</span>dst, dst_y <span class="k3">+</span> j<span class="k2">)</span> <span class="k3">+</span> dst_x <span class="k3">*</span> <span class="k1">sizeof</span><span class="k2">(</span><span class="k1">long</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">52</td><td>      </td></tr><tr><td class="number">53</td><td>      <span class="k1">for</span> <span class="k2">(</span>i <span class="k3">=</span> w<span class="k2">;</span> i<span class="k2">;</span> i--<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">54</td><td>        <span class="k1">unsigned</span> <span class="k1">long</span> temp1, temp2<span class="k2">;</span></td></tr><tr><td class="number">55</td><td> </td></tr><tr><td class="number">56</td><td>        <span class="c">/* Read data, 1 pixel at a time */</span></td></tr><tr><td class="number">57</td><td>        color2 <span class="k3">=</span> <span class="k3">*</span>s<span class="k2">;</span></td></tr><tr><td class="number">58</td><td>        color1 <span class="k3">=</span> <span class="k3">*</span>d<span class="k2">;</span></td></tr><tr><td class="number">59</td><td>        </td></tr><tr><td class="number">60</td><td>        <span class="k1">if</span> <span class="k2">(</span>color2 <span class="k3">=</span><span class="k3">=</span> <a href="http://www.allegro.cc/manual/MASK_COLOR_32" target="_blank"><span class="a">MASK_COLOR_32</span></a><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">61</td><td>          s<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">62</td><td>          d<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">63</td><td>          <span class="k1">continue</span><span class="k2">;</span></td></tr><tr><td class="number">64</td><td>        <span class="k2">}</span></td></tr><tr><td class="number">65</td><td>        </td></tr><tr><td class="number">66</td><td>        <span class="c">/* Mutiply by the factor */</span></td></tr><tr><td class="number">67</td><td>        temp2 <span class="k3">=</span> color1 <span class="k3">&amp;</span> <span class="n">0xFF00FF</span><span class="k2">;</span></td></tr><tr><td class="number">68</td><td>        temp1 <span class="k3">=</span> <span class="k2">(</span>color2 <span class="k3">&amp;</span> <span class="n">0xFF00FF</span><span class="k2">)</span> <span class="k3">-</span> temp2<span class="k2">;</span></td></tr><tr><td class="number">69</td><td>        temp1 <span class="k3">=</span> <span class="k2">(</span><span class="k2">(</span><span class="k2">(</span>temp1 <span class="k3">*</span> fact<span class="k2">)</span> <span class="k3">&gt;</span><span class="k3">&gt;</span> <span class="n">8</span><span class="k2">)</span> <span class="k3">+</span> temp2<span class="k2">)</span> <span class="k3">&amp;</span> <span class="n">0xFF00FF</span><span class="k2">;</span></td></tr><tr><td class="number">70</td><td>        color1 <span class="k3">&amp;</span><span class="k3">=</span> <span class="n">0xFF00</span><span class="k2">;</span></td></tr><tr><td class="number">71</td><td>        color2 <span class="k3">&amp;</span><span class="k3">=</span> <span class="n">0xFF00</span><span class="k2">;</span></td></tr><tr><td class="number">72</td><td>        temp2 <span class="k3">=</span> <span class="k2">(</span><span class="k2">(</span><span class="k2">(</span><span class="k2">(</span>color2 <span class="k3">-</span> color1<span class="k2">)</span> <span class="k3">*</span> fact<span class="k2">)</span> <span class="k3">&gt;</span><span class="k3">&gt;</span> <span class="n">8</span><span class="k2">)</span> <span class="k3">+</span> color1<span class="k2">)</span> <span class="k3">&amp;</span> <span class="n">0xFF00</span><span class="k2">;</span></td></tr><tr><td class="number">73</td><td>&#160;</td></tr><tr><td class="number">74</td><td>         <span class="c">/* Write the data */</span></td></tr><tr><td class="number">75</td><td>        s<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">76</td><td>        bmp_write32<span class="k2">(</span><span class="k2">(</span><span class="k1">unsigned</span> <span class="k1">long</span><span class="k2">)</span>d, temp1 <span class="k3">|</span> temp2<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">77</td><td>        d<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">78</td><td>      <span class="k2">}</span></td></tr><tr><td class="number">79</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">80</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">81</td><td>  </td></tr><tr><td class="number">82</td><td>  <span class="k1">return</span><span class="k2">;</span></td></tr><tr><td class="number">83</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 06 Mar 2007 00:16:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Well, if I take out both the water update and draw functions, back at home it would increase from about 60fps to 90fps
</p></div></div><p>That doesn&#39;t seem all that big difference. Have you profiled your program?</p><p>Also you seem to be doing a lot of streching. Are you sure it is faster than using correct size from the start?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Tue, 06 Mar 2007 00:26:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Have you profiled your program?
</p></div></div><p>
Have any recommended profilers for WindowsXP?  Googling...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 06 Mar 2007 00:30:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What compiler do you use ?<br />There are always a profiler with the compiler.</p><p>Example with gcc:</p><p>compile with -pg</p><p>Launch the program</p><p>Use gprof to have the information.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 06 Mar 2007 00:32:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Have any recommended profilers for WindowsXP?
</p></div></div><p>As said, there is gprof. Also MSVC6 enterprise edition used to have a profiler, I&#39;m not sure about the later versions.</p><p>Of cource as I said, if you could share your code I might take a look at it myself <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Tue, 06 Mar 2007 00:51:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And yes, code would be nice. I&#39;m bored and I might provide you with some nice graphs, similar to what I showed here, assuming your program compiles and runs on Linux
</p></div></div><p>
I never saw this editted portion of your above post.  Anyway, <a href="http://www.allegro.cc/depot/Toggles/">Toggles</a> is on the depot and, if you have the right libraries (which I believe are listed in the readme), should compile on Linux if you get the 1.2.15 version.  This code hasn&#39;t been touched since last August and doesn&#39;t include any of the recent optimizations I&#39;ve been working on.  I&#39;m still new to the linux environment, so I haven&#39;t quite learned all the tricks to make it easier to supply to you guys.  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>[Edit]<br />I&#39;d supply just the src code which I orginally had as a separate file, but I&#39;ve since taken my site down and don&#39;t have that available atm.  <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 06 Mar 2007 01:27:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Everything is truecolor, color depth 32 bits.
</p></div></div><p>

You can use <a href="http://www.allegro.cc/forums/thread/589627/644387#target">Fladimir&#39;s routines</a>, but only for 32 bits alpha blending.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Tue, 06 Mar 2007 10:14:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, to be honest, I threw that simple fblend function (that I listed above) directly into my code and it worked pretty nicely.  I also moved my logic around (do the blending <i>then</i> the stretching), which improved things.  Now it&#39;s running at 85+fps on my home machine with the water.  Not too shabby.  I might still try to do the profiler thing, if not for simply educational purposes...</p><p>Credits to all!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 06 Mar 2007 12:31:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The function you posted doesn&#39;t use MMX when it&#39;s alvailable. Better use the whole FBlend to speed everything up even more.</p><p>I&#39;ve always wondered why people are so afraid of third party libraries, anyways...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fladimir da Gorf)</author>
		<pubDate>Tue, 06 Mar 2007 18:01:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;ve always wondered why people are so afraid of third party libraries, anyways...
</p></div></div><p>

Because they go bump in the night and eat small children, why else? <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CursedTyrant)</author>
		<pubDate>Tue, 06 Mar 2007 21:39:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;ve always wondered why people are so afraid of third party libraries, anyways...
</p></div></div><p>
Well, for me at least, the whole hobbyist game programming thing is 1) a hobby and 2) educational.  Using more libraries makes option 1 more fitting, as you can produce a greater range of results faster but code-wise, the limit approaches &quot;make_awesome_game();&quot;  Hence, I try to figure things out with what I have first, then add libraries if I ahve to.  </p><p>Also, as I mentioned, I don&#39;t know how to properly make a linux binary, but I offer them the source so they can attempt to build it.  Each library, as far as I can tell, adds to the amount of work they have to do.  <i>That</i> I find very bad.</p><p>So, just stripping a function from the library seems to be the quickest and efficient solution to the bullet points above.  Although, it doesn&#39;t do much for the knowledge-portion other than realizing I should never use draw_trans_sprite again.  <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 06 Mar 2007 22:25:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I should never use draw_trans_sprite again. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div></div><p>

Why? what&#39;s wrong with draw_trans_sprite?<br />Right now I am using only draw_trans_sprite in some of my demos and there is no problem, at least in my PC (P4 2400MHz), perhaps I should test them in older machines? <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Tue, 06 Mar 2007 23:41:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Just to mention that in the SVN version of AllegroGL, draw_trans_sprite() is implemented using OpenGL when drawing to screen, which means it can be quite fast.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Milan Mimica)</author>
		<pubDate>Wed, 07 Mar 2007 05:01:27 +0000</pubDate>
	</item>
</rss>
