It may not be Window.update() afterall (or anymore, whichever you prefer).
Check this out...
This is one of my methods...
private void render() {
System.err.println("Render");//**
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
GL11.glLoadIdentity();
GL11.glTranslatef(0.0f, 0.0f, -250.0f);
GL11.glPushMatrix();
GL11.glRotatef(rot, 0.0f, 0.0f, 1.0f);
GL11.glColor3f(0.7f, 0.3f, 0.3f);
theSphere.draw(25.0f, 15, 15);
GL11.glPopMatrix();
rot += 1.0f;
System.err.println("End render... Rot = " + rot);//**
}
rot is an instance member variable. When I give it no access-specifier (package access), the program crashes with a blank window and the System.err.println ends up printing "End render... Rot = 100.0" EVERY TIME!!! If I change the increment value to 2.0f, it reports that rot = 200.0.
Basically, it crashes after 100 frames every time, without displaying a thing.
Interestingly, it DOESN'T crash if I comment out the Window.update() line.
Here's where it gets weird...
If I add the public access specifier in front of rot's declaration, the program runs great. It displays my little rotating sphere, and runs until I tell it to stop... rot's value has been in the thousands with no problems.
What could be causing this?