code package

Started by Thomas., October 23, 2012, 09:41:16 PM

Previous topic - Next topic

Thomas.

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?

EgonOlsen

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.

Thomas.