Hi, Henry,<div><br></div><div>Could you elaborate what is a "<span style>cairo gl surface that binds to a X window"? Where can I find example of it?</span></div><div><font color="#222222" face="arial, sans-serif"><br>
</font></div><div><font color="#222222" face="arial, sans-serif"><br>Thanks,<br>Guo<br></font><br><div class="gmail_quote">On Fri, May 11, 2012 at 12:28 PM, Henry (Yu) Song - SISA <span dir="ltr"><<a href="mailto:hsong@sisa.samsung.com" target="_blank">hsong@sisa.samsung.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Guo<br>
<br>
Cairo has GL backend. However, current cairo gl backend in cairo snapshot is not as good as expected. We have created a new MSAA-enabled gl compositor. It can be downloaded from <a href="http://code.google.com/p/cairogles/source/checkout" target="_blank">http://code.google.com/p/cairogles/source/checkout</a>, checkout the code, and switch to "release" branch. It supports MSAA for both glx and egl. We are still actively fixing bugs and optimization. Please let us know if you encounter any problem. The "release" branch is fully synced with cairo 1.12.2, and in the coming months, we hope we can upstream our code to cairo mainline. It also supports using a non-texture surface as source/mask. I will add a new API that fast-path of supporting non-texture surface as source/mask shortly.<br>
<br>
Cairo GL supports both non-texture surface (e.g., x window, pixmap, pbuffer) as well as texture surface. I don't see in your new logic why create cairo surface without window, you can create a cairo gl surface that binds to a X window., then you can draw into the surface and swap buffer directly on the window.<br>
<br>
Henry<br>
<br>
<br>
________________________________________<br>
From: cairo-bounces+henry.song=<a href="mailto:samsung.com@cairographics.org">samsung.com@cairographics.org</a> [cairo-bounces+henry.song=<a href="mailto:samsung.com@cairographics.org">samsung.com@cairographics.org</a>] on behalf of Guo Tang [<a href="mailto:guo.tang@sonoartis.com">guo.tang@sonoartis.com</a>]<br>
Sent: Friday, May 11, 2012 12:04 PM<br>
To: <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
Subject: [cairo] question on cairo, opengl and x-window<br>
<div class="HOEnZb"><div class="h5"><br>
Hi,<br>
<br>
We have a software that uses cairo and X window system. The old design is using several X windows, several of them are transparent. We use Cairo to draw<br>
image, curves and text annotation.<br>
<br>
The design with several X windows causes us some problems when we move to a newer version of Linux. It also has lots of trouble with Xming X window manager.<br>
We are thinking about a new design with just one X window. The image display part is already moved to OpenGL (for better performance reason). I am thinking about<br>
still keep our old cairo codes for text annotation, but avoiding a separate X window.<br>
<br>
The old logic:<br>
<br>
from X window, create_cairo_context.<br>
from a transparent png file, create a surface.<br>
set the surface to cairo context<br>
then draw things on cairo context<br>
<br>
If I want to just use one X window (this window already has OpenGL context in it). Is the solution this way?<br>
<br>
new logic:<br>
create a cairo context without any X window (?).<br>
png file to surface.<br>
set the surface to cairo context<br>
then draw things on cairo context<br>
get the drawing result back to memory.<br>
then use OpenGL to render it to hardware.<br>
<br>
<br>
I am wondering whether new logic is possible? Will all the cairo rendering all done in software without hardware acceleration, versus old logic has? If without HW acceleration, I will only<br>
be able to keep cairo for non real time drawing.<br>
Any better way to link OpenGL and cairo together? Like user still uses cairo API to draw, but it is actually drawing using hardware (openGL), in a specify depth, and<br>
with the opacity setting that I can control?<br>
<br>
Your advise is appreciated.<br>
<br>
Thanks,<br>
Guo<br>
<br>
</div></div></blockquote></div><br></div>