Small change to make it possible to intercept window closing actions (in

case we want to do something other than close the application at that 
time).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@173 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Mark Johnson
2007-03-19 23:11:56 +00:00
parent 0b8e4cf22a
commit a75658d7b0
+6 -3
View File
@@ -193,7 +193,7 @@ public class JmeApp
}
// enter the main rendering and event processing loop
while (!_finished && !_display.isClosing()) {
while (!_finished) {
try {
// render the current frame
long frameStart = processFrame();
@@ -223,6 +223,9 @@ public class JmeApp
stop();
}
}
if (_display.isClosing()) {
stop();
}
}
try {
@@ -310,7 +313,7 @@ public class JmeApp
// enable all of the "quick compares," which means that states will
// be refreshed only when necessary
Arrays.fill(RenderState.QUICK_COMPARE, true);
// set up the camera
_camera.setFrustumPerspective(45.0f, width/(float)height, 1, 10000);
Vector3f loc = new Vector3f(0.0f, 0.0f, 25.0f);
@@ -366,7 +369,7 @@ public class JmeApp
// make everything opaque by default
_geom.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
// set up a zbuffer
ZBufferState zbuf = _display.getRenderer().createZBufferState();
zbuf.setEnabled(true);