jPCT-AE - a 3d engine for Android > Support

Runtime exception when changed to Opengl ES 2.0

(1/3) > >>

gamerfan:
I am getting the following Runtime Exception when I change to OpenGL ES 2.0.I have updated with the latest japct-ae.jar.


--- Code: ---10-25 13:50:59.462: ERROR/AndroidRuntime(592): java.lang.RuntimeException: [ 1319530859409 ] - ERROR: java.lang.RuntimeException: [ 1319530859350 ] - ERROR: java.lang.RuntimeException: [ 1319530859305 ] - ERROR: java.lang.RuntimeException: [ 1319530859286 ] - ERROR: Couldn't read file from InputStream
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.Logger.log(Logger.java:189)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.Loader.loadBinaryFile(Loader.java:1111)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.Loader.loadTextFile(Loader.java:71)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.Loader.loadTextFile(Loader.java:61)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.GLSLShader.<init>(GLSLShader.java:210)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.GL20.<init>(GL20.java:118)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at java.lang.Class.newInstanceImpl(Native Method)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at java.lang.Class.newInstance(Class.java:1429)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.GLRenderer.init(GLRenderer.java:469)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.GLRenderer.init(GLRenderer.java:458)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.FrameBuffer.<init>(FrameBuffer.java:92)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at com.threed.jpct.FrameBuffer.<init>(FrameBuffer.java:117)
10-25 13:50:59.462: ERROR/AndroidRuntime(592):     at org.me.home.GameActivity$MyRenderer.onSurfaceChanged(GameActivity.java:207)

--- End code ---
I have done the modifications the way it were specified in wiki.Am I missing anything?

EgonOlsen:
It seems to be unable to find the default shader files. They should be located in the jpct-ae.jar. Are you by any chance using the classes in extracted form or something? Apart from that, keep in mind that the emulator doesn't support OpenGL ES 2.0 anyway. However, this shouldn't prevent the files from being found.

gamerfan:
No I have not extracted any classes from jar file. 

--- Quote ---Apart from that, keep in mind that the emulator doesn't support OpenGL ES 2.0 anyway

--- End quote ---
:'(

EgonOlsen:
I'm putting the shaders in the jar and since that works fine when using Eclipse for building the APK, i though that it's fine to do this. But after reading a little more about this topic, this doesn't seem to be the case. The Eclipse seems to be able to handle it, but other ways to build the APK don't seem to be able to handle this, which is a pity. I'll think about a solution....

EgonOlsen:
BLARGH...i don't like Android's intrusive way of dealing with resources...anyway, i've found a solution for this problem in a way that i provide an optional zip-file with the shaders and a ShaderLocator that you can use to load them. However, this isn't in any released version for now and if there's no need to release it now, i would like to postpone it.

Because you are using the emulator, you can't use ES 2.0 anyway...so if you really need this for an actual device (or anyone else does), please let me know. Otherwise, i won't upload it for now.

Navigation

[0] Message Index

[#] Next page

Go to full version