diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index 1bb63df902..89999fd2ba 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -1219,9 +1219,10 @@ do_add_window(GraphicsOutput *window, GraphicsStateGuardian *gsg, // now, we assume this is the app thread. _app.add_window(_app._window, window); - // This was info(), but that is spammy now with the ParisiteBuffer. - display_cat.debug() - << "Created " << window->get_type() << " " << (void *)window << "\n"; + if (display_cat.is_debug()) { + display_cat.debug() + << "Created " << window->get_type() << " " << (void *)window << "\n"; + } // By default, try to open each window as it is added. window->request_open(); @@ -1755,7 +1756,6 @@ void GraphicsEngine::RenderThread:: thread_main() { MutexHolder holder(_cv_mutex); while (true) { - _cv.wait(); switch (_thread_state) { case TS_wait: break; @@ -1780,7 +1780,6 @@ thread_main() { case TS_do_windows: do_windows(_engine); do_pending(_engine); - do_release(_engine); _thread_state = TS_wait; break; @@ -1789,5 +1788,6 @@ thread_main() { do_close(_engine); return; } + _cv.wait(); } } diff --git a/panda/src/display/graphicsOutput.cxx b/panda/src/display/graphicsOutput.cxx index 21e3d4df15..3e23770cb4 100644 --- a/panda/src/display/graphicsOutput.cxx +++ b/panda/src/display/graphicsOutput.cxx @@ -1259,6 +1259,7 @@ make_current() { void GraphicsOutput:: release_gsg() { _gsg.clear(); + _active = false; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/mainThread.h b/panda/src/express/mainThread.h index 317fe6fb25..3a30554e18 100644 --- a/panda/src/express/mainThread.h +++ b/panda/src/express/mainThread.h @@ -42,6 +42,10 @@ public: register_type(_type_handle, "MainThread", Thread::get_class_type()); } + virtual TypeHandle get_type() const { + return get_class_type(); + } + virtual TypeHandle force_init_type() {init_type(); return get_class_type();} private: static TypeHandle _type_handle; diff --git a/panda/src/express/thread.h b/panda/src/express/thread.h index a05f817f93..7a328f6565 100644 --- a/panda/src/express/thread.h +++ b/panda/src/express/thread.h @@ -83,6 +83,10 @@ public: register_type(_type_handle, "Thread", TypedReferenceCount::get_class_type()); } + virtual TypeHandle get_type() const { + return get_class_type(); + } + virtual TypeHandle force_init_type() {init_type(); return get_class_type();} private: static TypeHandle _type_handle;