Selaa lähdekoodia

build tinysdl with new engine rules

David Rose 17 vuotta sitten
vanhempi
sitoutus
8b407bb654

+ 2 - 1
panda/src/tinydisplay/tinySDLGraphicsPipe.cxx

@@ -91,6 +91,7 @@ make_output(const string &name,
             const FrameBufferProperties &fb_prop,
             const FrameBufferProperties &fb_prop,
             const WindowProperties &win_prop,
             const WindowProperties &win_prop,
             int flags,
             int flags,
+            GraphicsEngine *engine,
             GraphicsStateGuardian *gsg,
             GraphicsStateGuardian *gsg,
             GraphicsOutput *host,
             GraphicsOutput *host,
             int retry,
             int retry,
@@ -116,7 +117,7 @@ make_output(const string &name,
         ((flags&BF_can_bind_every)!=0)) {
         ((flags&BF_can_bind_every)!=0)) {
       return NULL;
       return NULL;
     }
     }
-    return new TinySDLGraphicsWindow(this, name, fb_prop, win_prop,
+    return new TinySDLGraphicsWindow(engine, this, name, fb_prop, win_prop,
                                      flags, gsg, host);
                                      flags, gsg, host);
   }
   }
   
   

+ 1 - 0
panda/src/tinydisplay/tinySDLGraphicsPipe.h

@@ -42,6 +42,7 @@ protected:
                                          const FrameBufferProperties &fb_prop,
                                          const FrameBufferProperties &fb_prop,
                                          const WindowProperties &win_prop,
                                          const WindowProperties &win_prop,
                                          int flags,
                                          int flags,
+                                         GraphicsEngine *engine,
                                          GraphicsStateGuardian *gsg,
                                          GraphicsStateGuardian *gsg,
                                          GraphicsOutput *host,
                                          GraphicsOutput *host,
                                          int retry,
                                          int retry,

+ 9 - 9
panda/src/tinydisplay/tinySDLGraphicsWindow.cxx

@@ -32,14 +32,14 @@ TypeHandle TinySDLGraphicsWindow::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 TinySDLGraphicsWindow::
 TinySDLGraphicsWindow::
-TinySDLGraphicsWindow(GraphicsPipe *pipe, 
-                   const string &name,
-                   const FrameBufferProperties &fb_prop,
-                   const WindowProperties &win_prop,
-                   int flags,
-                   GraphicsStateGuardian *gsg,
-                   GraphicsOutput *host) :
-  GraphicsWindow(pipe, name, fb_prop, win_prop, flags, gsg, host)
+TinySDLGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, 
+                      const string &name,
+                      const FrameBufferProperties &fb_prop,
+                      const WindowProperties &win_prop,
+                      int flags,
+                      GraphicsStateGuardian *gsg,
+                      GraphicsOutput *host) :
+  GraphicsWindow(engine, pipe, name, fb_prop, win_prop, flags, gsg, host)
 {
 {
   _screen = NULL;
   _screen = NULL;
   _frame_buffer = NULL;
   _frame_buffer = NULL;
@@ -304,7 +304,7 @@ open_window() {
   TinyGraphicsStateGuardian *tinygsg;
   TinyGraphicsStateGuardian *tinygsg;
   if (_gsg == 0) {
   if (_gsg == 0) {
     // There is no old gsg.  Create a new one.
     // There is no old gsg.  Create a new one.
-    tinygsg = new TinyGraphicsStateGuardian(_pipe, NULL);
+    tinygsg = new TinyGraphicsStateGuardian(_engine, _pipe, NULL);
     _gsg = tinygsg;
     _gsg = tinygsg;
 
 
   } else {
   } else {

+ 1 - 1
panda/src/tinydisplay/tinySDLGraphicsWindow.h

@@ -31,7 +31,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 class EXPCL_TINYDISPLAY TinySDLGraphicsWindow : public GraphicsWindow {
 class EXPCL_TINYDISPLAY TinySDLGraphicsWindow : public GraphicsWindow {
 public:
 public:
-  TinySDLGraphicsWindow(GraphicsPipe *pipe, 
+  TinySDLGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, 
                         const string &name,
                         const string &name,
                         const FrameBufferProperties &fb_prop,
                         const FrameBufferProperties &fb_prop,
                         const WindowProperties &win_prop,
                         const WindowProperties &win_prop,