Hi folks, is possible to use Compose for Desktop o...
# compose-desktop
s
Hi folks, is possible to use Compose for Desktop on a OpenGL application, example: I have a game writing in Kotlin using OpenGL and I want to do some GUI in Compose. I think that the currently Compose for Desktop is not possible, but using a Low Level API from Compose should be possible?
j
Is your game 2d or 3d?
s
Is for a 3d game, but what I'm looking for is understanding how can I use Compose beyond Swing/AWT
j
Yeah, totally, I just wanted too make sure I understood what you were asking, since it isn't helpful to answer the wrong question 😉. The short answer is that it is certainly possible and is a medium-difficulty task, but you will need a willingness to dive into the nitty gritty details and learn the Compose source code. Basically, you will want to create a node tree which is backed by OpenGL nodes, presumably using some Java OpenGL bindings like JOGL. I know @jw has implemented a couple of custom composers (targeting different output tree types), and he might be able to point you at one of his early experiments which may be a good jumping off point. You are probably better off asking this question in #compose as it would be about more general compose topics ("targeting a different composer") instead of about compose-desktop in particular, and you'll get more visibility there.
s
Thank you Jim :D
107 Views