浏览代码

make_current() should be unneeded before flip

David Rose 22 年之前
父节点
当前提交
baea752ded

+ 0 - 1
panda/src/dxgsg8/wdxGraphicsWindow8.cxx

@@ -254,7 +254,6 @@ begin_frame() {
 void wdxGraphicsWindow8::
 end_flip() {
   if (_dxgsg != (DXGraphicsStateGuardian8 *)NULL && is_active()) {
-    make_current();
     //    wdxdisplay8_cat.debug() << "current swapchain from end_flip is " << _wcontext.pSwapChain << "\n";
     _dxgsg->show_frame();
   }

+ 0 - 1
panda/src/dxgsg9/wdxGraphicsWindow9.cxx

@@ -255,7 +255,6 @@ begin_frame() {
 void wdxGraphicsWindow9::
 end_flip() {
   if (_dxgsg != (DXGraphicsStateGuardian9 *)NULL && is_active()) {
-    make_current();
     //wdxdisplay9_cat.debug() << "current swapchain from end_flip is " << _wcontext.pSwapChain << "\n";
     _dxgsg->show_frame();
   }

+ 5 - 1
panda/src/wgldisplay/wglGraphicsWindow.cxx

@@ -208,7 +208,11 @@ begin_flip() {
     // calling SwapBuffers() on a Matrix card, we crash a horrible
     // death.  This is a pity since make_current() seems unnecessary
     // on other cards, and does incur some performance overhead.
-    make_current();
+
+    // Let's see if this is still necessary now that we guarantee
+    // begin_flip() is not called until end_frame() has successfully
+    // rendered.
+    //make_current();
 
     SwapBuffers(_hdc);
   }