Browse Source

showbase: Temporarily add back throw_new_frame

This helps with slight version mismatch compat, we can remove it before release
rdb 2 weeks ago
parent
commit
1cfa61b435
2 changed files with 11 additions and 0 deletions
  1. 8 0
      direct/src/showbase/showBase.cxx
  2. 3 0
      direct/src/showbase/showBase.h

+ 8 - 0
direct/src/showbase/showBase.cxx

@@ -21,6 +21,7 @@ extern "C" { void CPSEnableForegroundOperation(ProcessSerialNumber* psn); }
 
 
 #include "showBase.h"
 #include "showBase.h"
 
 
+#include "throw_event.h"
 #include "graphicsWindow.h"
 #include "graphicsWindow.h"
 #include "renderBuffer.h"
 #include "renderBuffer.h"
 #include "camera.h"
 #include "camera.h"
@@ -44,6 +45,13 @@ ConfigureDef(config_showbase);
 ConfigureFn(config_showbase) {
 ConfigureFn(config_showbase) {
 }
 }
 
 
+// Throw the "NewFrame" event in the C++ world.  Some of the lerp code depends
+// on receiving this.
+void
+throw_new_frame() {
+  throw_event("NewFrame");
+}
+
 // Initialize the application for making a Gui-based app, such as wx.  At the
 // Initialize the application for making a Gui-based app, such as wx.  At the
 // moment, this is a no-op except on Mac.
 // moment, this is a no-op except on Mac.
 void
 void

+ 3 - 0
direct/src/showbase/showBase.h

@@ -16,6 +16,7 @@
 
 
 #include "directbase.h"
 #include "directbase.h"
 
 
+#include "eventHandler.h"
 #include "graphicsWindow.h"
 #include "graphicsWindow.h"
 #include "graphicsPipe.h"
 #include "graphicsPipe.h"
 #include "animControl.h"
 #include "animControl.h"
@@ -31,6 +32,8 @@ class GraphicsEngine;
 
 
 BEGIN_PUBLISH
 BEGIN_PUBLISH
 
 
+EXPCL_DIRECT_SHOWBASE void throw_new_frame();
+
 EXPCL_DIRECT_SHOWBASE void init_app_for_gui();
 EXPCL_DIRECT_SHOWBASE void init_app_for_gui();
 
 
 // to handle windows stickykeys
 // to handle windows stickykeys