Bläddra i källkod

remove make_current() from flip

David Rose 22 år sedan
förälder
incheckning
a6df37d6b0
1 ändrade filer med 7 tillägg och 1 borttagningar
  1. 7 1
      panda/src/glxdisplay/glxGraphicsWindow.cxx

+ 7 - 1
panda/src/glxdisplay/glxGraphicsWindow.cxx

@@ -142,7 +142,13 @@ begin_frame() {
 void glxGraphicsWindow::
 void glxGraphicsWindow::
 begin_flip() {
 begin_flip() {
   if (_gsg != (GraphicsStateGuardian *)NULL) {
   if (_gsg != (GraphicsStateGuardian *)NULL) {
-    make_current();
+
+    // It doesn't appear to be necessary to ensure the graphics
+    // context is current before flipping the windows, and insisting
+    // on doing so can be a significant performance hit.
+
+    //    make_current();
+
     glXSwapBuffers(_display, _xwindow);
     glXSwapBuffers(_display, _xwindow);
   }
   }
 }
 }