Hi,
I am experiencing an exception on a S5 which does not occur on another S5.
There is an older similar thread from 2015 here: Re: Object3D's transparency issue
http://www.jpct.net/forum2/index.php/topic,4232.45.html
This is the problem that occurs in a world.draw(fb) statement:
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.threed.jpct.Texture.getOpenGLID(int)' on a null object reference
at com.threed.jpct.GLRenderer.setTextures(GLRenderer.java:2534)
at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:2389)
at com.threed.jpct.World.draw(World.java:1419)
at com.threed.jpct.World.draw(World.java:1102)
at com.app.app_beta.ZYGLSurfaceView$ZYGLRenderer.onDrawFrame(ZYGLSurfaceView.java:298)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1649)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1354)
If I look at the code in GLRenderer I wonder why there is no check for a null texture:
private void setTextures(Object3D obj, int number, int modeNumber, FrameBuffer buffer, World world) {
int texInd = false;
if (obj.oneTextureSet) {
number = 0;
}
Texture texture = this.texMan.textures[obj.texture[number]];
>>> CHECK FOR NULL MISSING?? <<<<
if (texture.getOpenGLID(this.myID) == 0 || texture.getMarker(this.myID) == Texture.MARKER_DELETE_AND_UPLOAD) {
Of course the deeper question is why the texture is missing on one device and not on another.
Any tips?
I am experiencing an exception on a S5 which does not occur on another S5.
There is an older similar thread from 2015 here: Re: Object3D's transparency issue
http://www.jpct.net/forum2/index.php/topic,4232.45.html
This is the problem that occurs in a world.draw(fb) statement:
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.threed.jpct.Texture.getOpenGLID(int)' on a null object reference
at com.threed.jpct.GLRenderer.setTextures(GLRenderer.java:2534)
at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:2389)
at com.threed.jpct.World.draw(World.java:1419)
at com.threed.jpct.World.draw(World.java:1102)
at com.app.app_beta.ZYGLSurfaceView$ZYGLRenderer.onDrawFrame(ZYGLSurfaceView.java:298)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1649)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1354)
If I look at the code in GLRenderer I wonder why there is no check for a null texture:
private void setTextures(Object3D obj, int number, int modeNumber, FrameBuffer buffer, World world) {
int texInd = false;
if (obj.oneTextureSet) {
number = 0;
}
Texture texture = this.texMan.textures[obj.texture[number]];
>>> CHECK FOR NULL MISSING?? <<<<
if (texture.getOpenGLID(this.myID) == 0 || texture.getMarker(this.myID) == Texture.MARKER_DELETE_AND_UPLOAD) {
Of course the deeper question is why the texture is missing on one device and not on another.
Any tips?