mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0027879: Draw Harness, ViewerTest - disable VSync within non-interactive mode
This commit is contained in:
parent
8d795b5130
commit
14cb22a1a4
@ -558,8 +558,17 @@ TCollection_AsciiString ViewerTest::ViewerInit (const Standard_Integer thePxLeft
|
|||||||
(void)theDisplayName; // avoid warning on unused argument
|
(void)theDisplayName; // avoid warning on unused argument
|
||||||
SetDisplayConnection (new Aspect_DisplayConnection ());
|
SetDisplayConnection (new Aspect_DisplayConnection ());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (Draw_VirtualWindows)
|
||||||
|
{
|
||||||
|
// don't waste the time waiting for VSync when window is not displayed on the screen
|
||||||
|
ViewerTest_myDefaultCaps.swapInterval = 0;
|
||||||
|
// alternatively we can disable buffer swap at all, but this might be inappropriate for testing
|
||||||
|
//ViewerTest_myDefaultCaps.buffersNoSwap = true;
|
||||||
|
}
|
||||||
aGraphicDriver = new OpenGl_GraphicDriver (GetDisplayConnection());
|
aGraphicDriver = new OpenGl_GraphicDriver (GetDisplayConnection());
|
||||||
aGraphicDriver->ChangeOptions() = ViewerTest_myDefaultCaps;
|
aGraphicDriver->ChangeOptions() = ViewerTest_myDefaultCaps;
|
||||||
|
|
||||||
ViewerTest_myDrivers.Bind (aViewNames.GetDriverName(), aGraphicDriver);
|
ViewerTest_myDrivers.Bind (aViewNames.GetDriverName(), aGraphicDriver);
|
||||||
toCreateViewer = Standard_True;
|
toCreateViewer = Standard_True;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user