From d80b6bf93b97ce2446d72ee361f982645c221702 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 9 Jan 2002 23:35:49 +0000 Subject: [PATCH] convert to dx --- panda/src/testbed/open_window.cxx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/panda/src/testbed/open_window.cxx b/panda/src/testbed/open_window.cxx index be849ff0c5..0ba4172565 100644 --- a/panda/src/testbed/open_window.cxx +++ b/panda/src/testbed/open_window.cxx @@ -16,7 +16,6 @@ // //////////////////////////////////////////////////////////////////// -#include "glxGraphicsPipe.h" #include "graphicsWindow.h" #include "graphicsChannel.h" #include "graphicsLayer.h" @@ -29,6 +28,13 @@ #include "loader.h" #include "clockObject.h" +#ifdef USE_GLX + #include "glxGraphicsPipe.h" +#else + #include "wdxGraphicsPipe.h" +#endif + + // This program demonstrates creating a graphics window in Panda // explicitly, without using ChanCfg as an interface wrapper. // Normally we use ChanCfg to create the window and automatically set @@ -59,7 +65,13 @@ main(int argc, char *argv[]) { // know it's a weird way to pass parameters to an object. PipeSpecifier pipe_spec; - PT(GraphicsPipe) pipe = new glxGraphicsPipe(pipe_spec); + PT(GraphicsPipe) pipe; + +#ifdef USE_GLX + pipe = new glxGraphicsPipe(pipe_spec); +#else + pipe = new wdxGraphicsPipe(pipe_spec); +#endif // Now create a window on that pipe. GraphicsWindow::Properties window_prop; @@ -68,7 +80,7 @@ main(int argc, char *argv[]) { window_prop._xsize = 640; window_prop._ysize = 480; window_prop._title = "Window"; - //window_prop._fullscreen = true; + // window_prop._fullscreen = true; PT(GraphicsWindow) window = pipe->make_window(window_prop);