<div>Well, only using glBlendFuncSeperate is not enough to assure alpha value of </div>
<div>destination surface to be 1.0. For example, if both alpha value of source and </div>
<div>destination surface is 0, then the result alpha is 0.</div>
<div>But after this commit <a href="http://cgit.freedesktop.org/cairo/commit/?id=6b472e12ae11f7b68289cdfd616e765be9a25a98">6b472e12ae11f7b68289cdfd616e765be9a25a98</a>, the </div>
<div>CONTENT_COLOR similar surface is explicitly cleared to (0, 0, 0, 1). <br><br></div>
<div class="gmail_quote">2011/12/6 Chris Wilson <span dir="ltr">&lt;<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">On Tue,  6 Dec 2011 15:36:06 +0800, Chuanbo Weng &lt;<a href="mailto:strgnm@gmail.com">strgnm@gmail.com</a>&gt; wrote:<br>&gt; When use cairo_surface_create_similar() to create a CAIRO_CONTENT_COLOR<br>&gt; surface within gl backend, the result surface is transparent, fail.<br>
&gt; Since we use use GL_RGBA when create CAIRO_CONTENT_COLOR surface, we<br>&gt; should make sure the final alpha value is 1.0. So we set alpha value<br>&gt; of solid source operand to be 1.0, then the final surface is black,<br>
&gt; fixed.<br><br></div>Peculiar. The output alpha value from the blender is hardcoded to 1 for<br>a CAIRO_CONTENT_COLOR destination surface using glBlendFuncSeperate. Not<br>only that but the CONTENT_COLOR similar surface is explicitly cleared to<br>
(0, 0, 0, 1) during creation.<br>-Chris<br><font color="#888888"><br>--<br>Chris Wilson, Intel Open Source Technology Centre<br></font></blockquote></div><br>