within Compose/iOS ❔
Specifically; I'm interested in having a GLSL Shaded surface within my UI, and I imagine the path of least resistance would be via native view embedding. I've seen this is possible in both Android and Compose/Desktop... being able to do this in iOS would complete the set for our App K
✅ 1
l
Landry Norris
08/31/2022, 1:33 PM
I wrote a prototype for this, but it had to be manually told to re-render. I couldn’t find a way to have the UIView tell me that it changed (tried overriding the draw* methods, but they were never called). I’m sure someone at JetBrains much smarter than me will figure it out once they work on platform view support.
d
Dima Avdeev
09/01/2022, 6:24 AM
We have plans to provide possibility to use Compose inside UIKit (UIView hierarchy) and SwiftUI.
Another direction to use UIView inside Compose for now much harder.
As for use GLSL shaders - it's impossible inside iOS apps. iOS platform may use only Metal graphics API.
But, Google made Skia library. And we wrapped it in Kotlin and call it Skiko. And you may use GLSL like shaders. You may look at sample here:
https://github.com/dima-avdeev-jb/skiko-mpp-shader
But you should now, what Skiko library is not in stable version for now. And may break backward compatibility.