I’m creating an animation based on different images using libGDX, which I have implemented successfully but the slider widget keeps showing error with nullPointer exception(Exception in thread “Thread-2” javax.media.opengl.GLException: java.lang.NullPointerException… Caused by: java.lang.NullPointerException … at com.alex.SpriteBatch.SpriteBatchMain.render(SpriteBatchMain.java:259)). I’m adding the slider widget as an actor through a stage-in setInputProcessor, in ApplicationListener class. I can’t seem to find a good example on the usage of slider in libGDX. Can anyone please show me an example of using a slider, with the usage like in which class and method the commands should be written and such?(like what should be in the Create method or Render method or Resize method or if in Screen class-in Show method)
I just need the animation of several images to be controlled by a slider. Could someone please help me out with the slider widget for animation in libgdx with an example?
I’m creating an animation based on different images using libGDX, which I have implemented
Share
I have seen this kind of error when attempting to access the graphics context before it has been initialised.
You can see an example of the slider here: http://www.netthreads.co.uk/2012/06/24/libgdx-audio-tonome/
I haven’t updated this to the very latest version of LIbGDX but it should still apply.