Fix gl debug output rant about uninitialised sync

This commit is contained in:
Vincent Lejeune 2014-08-21 23:31:45 +02:00
parent 187c9fca85
commit 062bcb1ff0

View File

@ -231,6 +231,8 @@ void IrrDriver::renderSolidFirstPass()
AnimatedListMatDetails::getInstance()->clear();
AnimatedListMatUnlit::getInstance()->clear();
// Add a 30 ms timeout
if (!m_sync)
m_sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
GLenum reason = glClientWaitSync(m_sync, GL_SYNC_FLUSH_COMMANDS_BIT, 30000000);
/* switch (reason)
{