Просмотр исходного кода

remove make_current() from flip

David Rose 22 лет назад
Родитель
Сommit
a6df37d6b0
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      panda/src/glxdisplay/glxGraphicsWindow.cxx

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

@@ -142,7 +142,13 @@ begin_frame() {
 void glxGraphicsWindow::
 begin_flip() {
   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);
   }
 }