www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Thomas. on October 23, 2012, 09:41:16 PM

Title: code package
Post by: Thomas. on October 23, 2012, 09:41:16 PM
How can I do package from my code? I mean something like jPCT, that contains also shaders. I have no idea how can I load shaders and textures from package... And are there any rules as to how it should look like?
Title: Re: code package
Post by: EgonOlsen on October 23, 2012, 10:35:21 PM
I'm just adding the shaders to the jar (with no package, but that should work as well) and get the stream to them via


this.getClass().getResourceAsStream(name)


However, some tools for deploying the app via USB seem not to support this way. They simply drop all non-class files from the jar when creating the APK, because the behaviour of what is supposed to happen to these files isn't very well defined for Android/Dalvik.
Title: Re: code package
Post by: Thomas. on October 24, 2012, 12:20:29 PM
it works, thanks ;)