Browse Source

CallbackGraphicsWindow for Windows

David Rose 14 years ago
parent
commit
191863995a
2 changed files with 15 additions and 0 deletions
  1. 14 0
      panda/src/wgldisplay/wglGraphicsPipe.cxx
  2. 1 0
      panda/src/wgldisplay/wglGraphicsPipe.h

+ 14 - 0
panda/src/wgldisplay/wglGraphicsPipe.cxx

@@ -234,6 +234,20 @@ make_output(const string &name,
   return NULL;
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: wglGraphicsPipe::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) wglGraphicsPipe::
+make_callback_gsg(GraphicsEngine *engine) {
+  return new wglGraphicsStateGuardian(engine, this, NULL);
+}
+
 
 ////////////////////////////////////////////////////////////////////
 //     Function: wglGraphicsPipe::format_pfd_flags

+ 1 - 0
panda/src/wgldisplay/wglGraphicsPipe.h

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