Author Topic: code package  (Read 680 times)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
code package
« 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?
« Last Edit: October 23, 2012, 09:44:59 pm by Thomas. »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11746
    • View Profile
    • http://www.jpct.net
Re: code package
« Reply #1 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

Code: [Select]
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.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: code package
« Reply #2 on: October 24, 2012, 12:20:29 pm »
it works, thanks ;)