Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit a8491a88 authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Disabling VSync.

parent f232b9ad
......@@ -895,12 +895,12 @@ void GLViewer::manageAnimations()
// Make all active animated objects to execute a new animation step.
QTime currentTime = QTime::currentTime();
float dt = 0.001f * m_AnimationFrameTime.msecsTo( currentTime );
m_AnimationFrameTime = currentTime;
if( animationsRunning )
{
QTime currentTime = QTime::currentTime();
float dt = 0.001f * m_AnimationFrameTime.msecsTo( currentTime );
m_AnimationFrameTime = currentTime;
if( m_AnimationsRunningAtPreviousFrame )
for( auto anim=m_ActiveAnimations.begin(); anim!=m_ActiveAnimations.end(); ++anim )
if( !anim.key()->isAnimationPaused() )
......
......@@ -28,6 +28,17 @@ int UILaunch( int argc, char **argv )
QApplication::setAttribute( Qt::AA_ShareOpenGLContexts, true );
QApplication a( argc, argv );
QSurfaceFormat format;
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
format.setRedBufferSize(8);
format.setGreenBufferSize(8);
format.setBlueBufferSize(8);
format.setAlphaBufferSize(8);
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
format.setSwapInterval(0);
QSurfaceFormat::setDefaultFormat(format);
UIMainWindow *mainWin = new UIMainWindowT(); // Use default GUI main window.
mainWin->onInitializingApp();
mainWin->init();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment