Is Cairo acelerated on Opengl backend?
Asked Answered
L

2

10

By this I mean, does Cairo draw lines, shapes and everything using opengl acelerated primitives or no? and if not, a library that does this?

Limitation answered 16/9, 2011 at 17:12 Comment(0)
L
1

Cairo is designed to have a flexible backend for rendering. It can use OpenGL for rendering, though support is still listed as "experimental" at this point. For details, see using cairo with OpenGL.

It can also output to the X Window System, Quartz, Win32, image buffers, PostScript, PDF, and SVG, and more.

Lumpish answered 16/9, 2011 at 17:14 Comment(2)
I know that page, but from what I read it is not clear if you just draw on a texture using software rendering or all rendering process is accelleratedLimitation
I'd really like to know the answer as well.Mythology
C
6

The OpenGL backend certainly accelerates some functions. But there are many it can't accelerate. The fact that it's written against GL 2.1 (and thus can't use more advanced features of 3.x or 4.x hardware) means that there is a lot that it simply cannot accelerate.

If you are willing to limit yourself to NVIDIA hardware, NVIDIA just came out with the NV_path_rendering extension, which provides a lot of the 2D functionality you would find with Cairo. Indeed, it's possible that you could write a Cairo backend for it. The path rendering extension is only available on GeForce 8xxx hardware and above.

It's nifty in that it's focused on the vertex pipeline. It doesn't do things like gradients or colors or whatever. That's good, because it still allows you the use of a fragment shader. Which means you get to do pretty much whatever you want ;)

Cubital answered 16/9, 2011 at 20:51 Comment(1)
What's the status now, 7 years on?Sequestrate
L
1

Cairo is designed to have a flexible backend for rendering. It can use OpenGL for rendering, though support is still listed as "experimental" at this point. For details, see using cairo with OpenGL.

It can also output to the X Window System, Quartz, Win32, image buffers, PostScript, PDF, and SVG, and more.

Lumpish answered 16/9, 2011 at 17:14 Comment(2)
I know that page, but from what I read it is not clear if you just draw on a texture using software rendering or all rendering process is accelleratedLimitation
I'd really like to know the answer as well.Mythology

© 2022 - 2024 — McMap. All rights reserved.