Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Where did you find an OpenGL render backend in GTK2/3?


https://www.cairographics.org/backends/ GTK -> GDK -> Cairo -> OpenGL


Did anyone actually try to make that run in practice? I don't think GTK supports that. You can't just magically hot-swap Cairo backends externally. Using the GL backend means you provide GL surfaces to Cairo instead of memory.


It runs like crap, that's why it isn't supported. But if really, really want to make it work, you can have your app make a surface, put a cairo surface in it, then render GTK there. I suggest you don't waste any time on this. Mozilla, Google and Samsung had many people _each_ assigned to fix it at some point. The Google gave up, bought Skia. Then Mozilla also gave up and used the now Open Source Skia. Samsung somehow kept poking at it for a few more years until they dissolved their Open Source division and scaled down Tizen. At some point Samsung make a Vulkan backend for unknown reasons.

With Qt 4/5, there is an environment variable, to play with. It sill runs like crap and is now deprecated.

edit: Of course, GTK4 have "real" backends for both Vulkan and OpenGL. They implement scene graphs like QtQuick rather than building a big bitmap like GTK2, GTK3 and QtWidgets.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: