Open Snehks opened 3 years ago
Hi @Snehks,
Thanks for the report.
Sorry for the delay, but I do not actively maintain this project atm.
I will check on the issue next week and hopefully prepare a new release for LibGDX 1.10.0
Hi, I get this error too. Have you already found some time to look at this ? Thanks !
This issue is still there after the update to libGDX 1.10.0
Hi, sorry for not coming back to you earlier on this one. The problem was identified a while ago and still didn't get any resolution.
The issue here is with the specifics of MobiVM. iOS modules basically don't pick up the library's built in asset files (including those shader vert/frag ones).
While there's technically still no easy fix, one workaround would be to extract the library's assets and add them to iOS module manually. For that you'd need to
gdx-vfx/effects/assets
dir and place it to the root of your iOS submodule.robovm.xml
file add a resource configuration entry like so
<config>
...
<resources>
<resource>
<directory>assets</directory>
<includes>
<include>**</include>
</includes>
<skipPngCrush>true</skipPngCrush>
</resource>
...
</resources>
That should do the trick. Please let me know if you have any issues with that.
Hi,
Many thanks for your answer !
I’ll try that ;-)
Happy new year !
Laurent
De : Anton Chekulaev @.> Envoyé : jeudi 30 décembre 2021 20:33 À : crashinvaders/gdx-vfx @.> Cc : Laurent Crenier @.>; Comment @.> Objet : Re: [crashinvaders/gdx-vfx] Crash on iOS (#16)
Hi, sorry for not coming back to you earlier on this one. The problem was identified a while ago and still didn't get any resolution.
The issue here is with the specifics of MobiVM. iOS modules basically don't pick up the library's built in asset files (including those shader vert/frag ones).
While there's technically still no easy fix, one workaround would be to extract the library's assets and add them to iOS module manually. For that you'd need to
Hey @metaphore, thanks for providing an workaround.
If I understood this correctly, the vert/frag files are read using Gdx.files.classpath
, for example here: https://github.com/crashinvaders/gdx-vfx/blob/3de10cf9004715d809ca1559ca2f915c602b2fbf/gdx-vfx/effects/src/com/crashinvaders/vfx/effects/util/CopyEffect.java#L33
I tested the workaround and I believe it doesn't work because when the FileHandle
tries to read it, it loads from the classpath here.
Do you have any suggestions on alternatives? (maybe using Gdx.files.internal
given it will try both the internal and classpath types?)
Cheers!
Unfortunately, the MobiVM team hasn't provided any helpful insight as of yet and I don't really have any good workaround for the vfx-effects
module.
The only thing that can be done now, is to grab the effects code, replace all the classpath
file references with internal
. That requires having all the vert and frag shader files to be manually added to your game's assets...
Thanks!
I copied the code for the time being, replacing the references.
Note for future readers: you have to do it to iOS only. For Android, still use the classpath
call. I didn't test for other platforms but I believe it is a good idea keep using classpath
.
Cheers!
Hi, I am getting the following crash on iOS.
The project works fine on desktop and Android.