Michał Kalinowski

06/16/2021, 11:01 AM
From what I understand Skia works fine with a random OpenGL context via
but OpenGL cannot be easily initialised with Skia(at least not so easily). And I'm wondering if there is any objection to add an manual initialization of the graphics api context in desktop-compose to make both things compatible? Or maybe is it already planned? Or am I wrong and it isn't that simple?


06/16/2021, 11:04 AM
Skia can (and does in Compose) use different rendering engine, and OpenGL is not even supported in macOS, so not sure what could above proposal bring in general case. But one could go in opposite direction, and bind OpenGL context to Compose Window (like in asking SkiaLayer for native window handle

Michał Kalinowski

06/16/2021, 11:10 AM
OpenGL is just an example, but of course using abstractions different platforms could just have different possible graphics APIs. And what would it bring, I have my own rendering engine in lwjgl, and I would like to integrate my rendering engine with desktop-compose for ui, so that one thing does not interfere with another.
Skia after all is not written in a modern way so they leave a back door for just such integrations(like many other libraries such as imgui), and it works, and it would be nice if compose desktop would also have these . In the other direction, integration is definitely more difficult and requires hacks. It's like trying to build a building and then replacing the foundations at the end.