On Sat, Nov 24, 2012 at 7:52 AM, Jack <span dir="ltr">&lt;<a href="mailto:jack@rybn.org" target="_blank">jack@rybn.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
&gt;&gt; Seriously, as Chris says it&#39;s better to use shaders now, it&#39;s more<br>
&gt;&gt; flexible.<br>
&gt; i do not agree.<br>
&gt; using shader, how would you do :<br>
&gt; GL_ONE_MINUS_SRC_COLOR<br>
&gt; you need the source color. a readback is not an option.<br>
</div>In my mind i was thinking about textures operations with the use of two<br>
framebuffers if you need to capture the scene.<br>
With this solution, you can determine the source and destination in your<br>
fragment shader (as glBlendFunc) then operate on destination something<br>
equivalent to GL_ONE_MINUS_SRC_COLOR, or i miss something and i am wrong ?<br>
If this solution is OK, you needn&#39;t readback...<br>
<div class="im"><br></div></blockquote><div><br></div><div>That is essentially what recent GPUs do internally for blending anyway.  There hasn&#39;t been a fixed function hardware pixel pipeline for some time now.  It is more complicated to do for simple geometry in a GEM patch, as Cyrille points out so it&#39;s good to have the &#39;old&#39; way for that.  </div>
</div>