korge icon indicating copy to clipboard operation
korge copied to clipboard

[Question] Use KorGe with Compose

Open MohamedRejeb opened this issue 1 year ago • 3 comments

Can I use some parts of KorGe as a faster Canvas with less latency in a Compose Multiplatform project?

MohamedRejeb avatar Feb 10 '24 11:02 MohamedRejeb

Related PR: https://github.com/korlibs/korge/pull/1801

soywiz avatar Feb 13 '24 11:02 soywiz

The main obstacle is that KorGE uses OpenGL, while Compose uses different rendering engines. In Android we can use an OpenGL view AFAIK, but in other targets might be more complicated.

Related issues:

  • https://github.com/korlibs/korge/issues/1704
  • https://github.com/korlibs/korge/issues/784
  • https://github.com/korlibs/korge/issues/640

In the case of Metal there is another approach that is: https://developer.apple.com/documentation/metal/metal_sample_code_library/mixing_metal_and_opengl_rendering_in_a_view

soywiz avatar Feb 13 '24 11:02 soywiz

If compose or someone implements/supports an OpenGL View in common code, we can use that.

soywiz avatar Feb 13 '24 11:02 soywiz