diff --git a/panda/src/framework/framework.cxx b/panda/src/framework/framework.cxx index 8198a3040e..170fa85905 100644 --- a/panda/src/framework/framework.cxx +++ b/panda/src/framework/framework.cxx @@ -1522,12 +1522,12 @@ int framework_main(int argc, char *argv[]) { AnimControlCollection anim_controls; auto_bind(root, anim_controls, ~0); anim_controls.loop_all(true); - - // Now prepare all the textures with the GSG. - NodePath render_path(render); - render_path.prepare_scene(main_win->get_gsg()); } + // Now prepare all the textures with the GSG. + NodePath render_path(render); + render_path.prepare_scene(main_win->get_gsg()); + // Set up keyboard events. event_handler.add_hook("escape", event_esc); event_handler.add_hook("q", event_esc);