Hi I am thinking of sharing logic and api for fila...
# multiplatform
d
Hi I am thinking of sharing logic and api for filament in kmp project do you think using expect actual will be great approach since they provide android library and cocopods one for ios Any suggestion and can this lead to problems filament :https://github.com/google/filament
a
We've had no problems with expect / actual at all and used in some apps that make decent use of graphics, but not likely to your level. I would likely try to use it for loading / drawing shared components where the creation of the component is platform specific, but the internal logic of drawing can then be shared. If I understand the description of your project correctly, this may fit your needs.
d
I am trying to build a library for 3d in kmp @Anonymike
a
I would say make a branch and give it ago for some simple calls, but you'll want to benchmark to be safe before you get too far. Something I've seen in a lot of graphics libraries is the need to create a context class as well to hold all the common values so you're not passing through multiple layers and calls all the time for common internal needs.
d
hmm thanks will share my work one I create something useful thanks for sharing
a
I hope it helped a little bit, or it least gives you a little more confidence to test it out. Sorry I couldn't be more helpful 👍
❤️ 1
s
I implemented an Android part using Filament, but for the iOS side used SceneKit
d
do you share code with some abstraction by sharing models and apis