From 191863995a6be24fcf67642a81463e5e7df3b02a Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 9 Jan 2012 23:47:25 +0000 Subject: [PATCH] CallbackGraphicsWindow for Windows --- panda/src/wgldisplay/wglGraphicsPipe.cxx | 14 ++++++++++++++ panda/src/wgldisplay/wglGraphicsPipe.h | 1 + 2 files changed, 15 insertions(+) diff --git a/panda/src/wgldisplay/wglGraphicsPipe.cxx b/panda/src/wgldisplay/wglGraphicsPipe.cxx index 18d5209257..73ce3383b9 100644 --- a/panda/src/wgldisplay/wglGraphicsPipe.cxx +++ b/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 diff --git a/panda/src/wgldisplay/wglGraphicsPipe.h b/panda/src/wgldisplay/wglGraphicsPipe.h index 20af81b45f..ed631e3a55 100644 --- a/panda/src/wgldisplay/wglGraphicsPipe.h +++ b/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: