David Rose 13 лет назад
Родитель
Сommit
779fceafdd
2 измененных файлов с 15 добавлено и 0 удалено
  1. 1 0
      panda/src/cocoadisplay/cocoaGraphicsPipe.h
  2. 14 0
      panda/src/cocoadisplay/cocoaGraphicsPipe.mm

+ 1 - 0
panda/src/cocoadisplay/cocoaGraphicsPipe.h

@@ -62,6 +62,7 @@ protected:
                                          GraphicsOutput *host,
                                          GraphicsOutput *host,
                                          int retry,
                                          int retry,
                                          bool &precertify);
                                          bool &precertify);
+  virtual PT(GraphicsStateGuardian) make_callback_gsg(GraphicsEngine *engine);
 
 
 private:
 private:
   void load_display_information();
   void load_display_information();

+ 14 - 0
panda/src/cocoadisplay/cocoaGraphicsPipe.mm

@@ -380,3 +380,17 @@ make_output(const string &name,
   // Nothing else left to try.
   // Nothing else left to try.
   return NULL;
   return NULL;
 }
 }
+
+////////////////////////////////////////////////////////////////////
+//     Function: CocoaGraphicsPipe::make_callback_gsg
+//       Access: Protected, Virtual
+//  Description: This is called when make_output() is used to create a
+//               CallbackGraphicsWindow.  If the GraphicsPipe can
+//               construct a GSG that's not associated with any
+//               particular window object, do so now, assuming the
+//               correct graphics context has been set up externally.
+////////////////////////////////////////////////////////////////////
+PT(GraphicsStateGuardian) CocoaGraphicsPipe::
+make_callback_gsg(GraphicsEngine *engine) {
+  return new CocoaGraphicsStateGuardian(engine, this, NULL);
+}