From: Jeremiah B. <jbl...@da...> - 2011-01-28 03:34:06
|
Hi there, I've been trying to run the NeHeLesson4 OpenGL example but I keep running into exceptions. From Eclipse or the command line, I get the following output, exception, and stack trace: View: 320.0,480.0 Exception in thread "Thread-6" java.lang.NullPointerException at org.lwjgl.opengl.GL11.glViewport(GL11.java:3199) at org.xmlvm.iphone.gl.GL.glViewport(GL.java:625) at org.xmlvm.iphone.demo.gl.nehelesson4.GLView.setupView(GLView.java:133) at org.xmlvm.iphone.demo.gl.nehelesson4.GLView.drawView(GLView.java:155) at org.xmlvm.iphone.demo.gl.nehelesson4.GLView$1.timerEvent(GLView.java:112) at org.xmlvm.iphone.NSTimer.timerTick(NSTimer.java:81) at org.xmlvm.iphone.NSTimer.access$1(NSTimer.java:80) at org.xmlvm.iphone.NSTimer$1.run(NSTimer.java:52) Now, I did fix what appeared to be an error that prevented "setupView" from being called, but even without it, I get very similar results: View: 320.0,480.0 Exception in thread "Thread-6" java.lang.NullPointerException at org.lwjgl.opengl.GL11.glClear(GL11.java:586) at org.xmlvm.iphone.gl.GL.glClear(GL.java:594) at org.xmlvm.iphone.demo.gl.nehelesson4.GLView.drawView(GLView.java:161) at org.xmlvm.iphone.demo.gl.nehelesson4.GLView$1.timerEvent(GLView.java:112) at org.xmlvm.iphone.NSTimer.timerTick(NSTimer.java:81) at org.xmlvm.iphone.NSTimer.access$1(NSTimer.java:80) at org.xmlvm.iphone.NSTimer$1.run(NSTimer.java:52) I've tried tracking down the problem but I'm not having any luck. Anyone know how I can get this working? I'm in the process of porting some of my code over to the iPhone but this has become a roadblock for me. Thanks in advance! -Jeremiah |