From 2408212aaceddb8fb85630a8e8728dad533868ee Mon Sep 17 00:00:00 2001 From: Josh Yelon Date: Wed, 7 Jun 2006 20:15:38 +0000 Subject: [PATCH] Fixed framework --- panda/src/display/graphicsEngine.I | 17 ----------------- panda/src/display/graphicsEngine.h | 2 -- panda/src/framework/windowFramework.cxx | 11 +++++++++-- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/panda/src/display/graphicsEngine.I b/panda/src/display/graphicsEngine.I index 9c18788d4d..c76512462f 100644 --- a/panda/src/display/graphicsEngine.I +++ b/panda/src/display/graphicsEngine.I @@ -91,23 +91,6 @@ close_gsg(GraphicsPipe *pipe, GraphicsStateGuardian *gsg) { pipe->close_gsg(gsg); } -//////////////////////////////////////////////////////////////////// -// Function: GraphicsEngine::make_window -// Access: Published -// Description: Syntactic shorthand for make_output -//////////////////////////////////////////////////////////////////// -INLINE GraphicsWindow *GraphicsEngine:: -make_window(GraphicsStateGuardian *gsg, const string &name, int sort) { - // The hardwired size here is never used. - FrameBufferProperties fbprops = FrameBufferProperties::get_default(); - GraphicsOutput *result = make_output(gsg->get_pipe(), name, sort, - fbprops, 50, 50, - GraphicsPipe::BF_require_window | - GraphicsPipe::BF_fb_props_optional, - gsg, NULL); - return DCAST(GraphicsWindow, result); -} - //////////////////////////////////////////////////////////////////// // Function: GraphicsEngine::make_buffer // Access: Published diff --git a/panda/src/display/graphicsEngine.h b/panda/src/display/graphicsEngine.h index bc2f15f571..369c9c62f4 100644 --- a/panda/src/display/graphicsEngine.h +++ b/panda/src/display/graphicsEngine.h @@ -77,8 +77,6 @@ PUBLISHED: GraphicsOutput *host = 0); // Syntactic shorthand versions of make_output - INLINE GraphicsWindow *make_window(GraphicsStateGuardian *gsg, - const string &name, int sort); INLINE GraphicsOutput *make_buffer(GraphicsStateGuardian *gsg, const string &name, int sort, int x_size, int y_size); diff --git a/panda/src/framework/windowFramework.cxx b/panda/src/framework/windowFramework.cxx index f99ee32f1f..d6b1626baa 100644 --- a/panda/src/framework/windowFramework.cxx +++ b/panda/src/framework/windowFramework.cxx @@ -157,8 +157,15 @@ open_window(const WindowProperties &props, GraphicsEngine *engine, next_window_index++; string name = stream.str(); - _window = engine->make_window(gsg, name, 0); - if (_window != (GraphicsWindow *)NULL) { + _window = 0; + GraphicsOutput *winout = + engine->make_output(pipe, name, 0, + FrameBufferProperties::get_default(), + 100, 100, GraphicsPipe::BF_require_window, + gsg, NULL); + + if (winout != (GraphicsOutput *)NULL) { + _window = DCAST(GraphicsWindow, winout); _window->request_properties(props); // Create a display region that covers the entire window.