Author Topic: Set uniform with SimpleVector  (Read 1599 times)

Offline zbych

  • int
  • **
  • Posts: 75
    • View Profile
Set uniform with SimpleVector
« on: October 18, 2012, 09:08:22 pm »
When I am trying to set uniform with setUniform(String, SimpleVector) I get error, but setting the same with float[] works ok. Uniform variable is vec3 type.
It's not big problem for me to use float arrays but maybe I done something wrong. I presume array version is faster than SimpleVector.

10-18 20:49:57.446: E/AndroidRuntime(11941): FATAL EXCEPTION: GLThread 8991
10-18 20:49:57.446: E/AndroidRuntime(11941): java.lang.NullPointerException
10-18 20:49:57.446: E/AndroidRuntime(11941):    at com.threed.jpct.GLSLShader.update(GLSLShader.java:561)
10-18 20:49:57.446: E/AndroidRuntime(11941):    at com.threed.jpct.GL20.updateShaderData(GL20.java:215)
10-18 20:49:57.446: E/AndroidRuntime(11941):    at com.threed.jpct.GLRenderer.initShader(GLRenderer.java:519)
10-18 20:49:57.446: E/AndroidRuntime(11941):    at com.threed.jpct.CompiledInstance.render(CompiledInstance.java:427)
10-18 20:49:57.446: E/AndroidRuntime(11941):    at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:2211)
10-18 20:49:57.446: E/AndroidRuntime(11941):    at com.threed.jpct.World.draw(World.java:1307)
10-18 20:49:57.446: E/AndroidRuntime(11941):    at com.threed.jpct.World.draw(World.java:1074)
10-18 20:49:57.446: E/AndroidRuntime(11941):    at com.zr.tile3d.MainActivity.onDrawFrame(MainActivity.java:301)
10-18 20:49:57.446: E/AndroidRuntime(11941):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
10-18 20:49:57.446: E/AndroidRuntime(11941):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Set uniform with SimpleVector
« Reply #1 on: October 18, 2012, 10:01:00 pm »
Which version is that? If it's 1.25, please try the latest beta instead: http://jpct.de/download/beta/jpct_ae.jar

If that still fails, please post the stack trace for that version, too.

Offline zbych

  • int
  • **
  • Posts: 75
    • View Profile
Re: Set uniform with SimpleVector
« Reply #2 on: October 18, 2012, 10:08:43 pm »
Beta version work fine  :)