I can't seem to get keyboard polling working in the hello world program. I copied the poll and keyaffected functions from the fps and have some variables. I don't get errors on the program, but when I try to run it with the polling I get these errors:
Exception in thread "main" java.lang.NullPointerException
at HelloWorldAWTGL.poll(HelloWorldAWTGL.java:92)
at HelloWorldAWTGL.loop(HelloWorldAWTGL.java:56)
at HelloWorldAWTGL.main(HelloWorldAWTGL.java:24)
OK I think it was null because I didn't include these lines:
frame.addWindowListener(new WindowEvents());
keyMapper=new KeyMapper(frame);
but now I get an error on the WindowEvents() function saying it can't resolve it, so apparently I'm not importing something.
Nevermind, apparently I didn't need to do anything with WindowEvents, I just needed to add the keymapper to the frame, or vice versa, whatever.