浏览代码

Fixed framework

Josh Yelon 19 年之前
父节点
当前提交
2408212aac
共有 3 个文件被更改,包括 9 次插入21 次删除
  1. 0 17
      panda/src/display/graphicsEngine.I
  2. 0 2
      panda/src/display/graphicsEngine.h
  3. 9 2
      panda/src/framework/windowFramework.cxx

+ 0 - 17
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

+ 0 - 2
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);

+ 9 - 2
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.