<@U0BLPSJAK> We've been trying to get korge to run...
# korge
s
@Deactivated User We've been trying to get korge to run in a secondary thread on iOS. With some modifications in korgw, korge and korim (primarily by making some global properties ThreadLocal), it seems to run. But we can't seem to get anything rendered on the screen. We've tried to monitor the flow through the BatchRenderer and then OpenglAG. It all seems okay. there are no gl errors as well. Could you advise how we can dive deeper?
d
OpenGL requires sharing the context, and that will require some extra calls in both threads. There is plan for a multithreaded renderer that will fix some issues and will also allow these use cases. Also there are plans for a vulkan renderer that will ve by design multithreaded. Can you create an issue at github with the details on how are you setting it up so we can figure out?
s
sure.. Will do that. The thing is we're doing it all in a single thread. So context sharing shouldn't be required. No?
d
It requires rendering to a texture, then rendering that texture in the frambebuffer in the render thread I guess
s
Actually, we're rendering to a texture.. But in the render thread itself... We're using Avcomposition for the final compositing... Which seems to work.. Coz the clear color reflects on the final composite. The problem is in the first step itself where we're rendering to the texture using korge. Jfyi, From korge's perspective, it's still drawing to main frame buffer, coz we are configuring and binding the framebuffer externally in the app (that too on the render thread)
Actually, it works now. We just missed a couple of silly things. Not sure if that's the way to go. Will raise a PR for your comments
👍 1
🙏 1