Handle restorePrimaryOnZero in CGLXManager::activateContext
Done similar as it was done in CWGLManager::activateContext, thought not tested as I currently have no test-case for this on X11. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5785 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
ed6d0d58fc
commit
58958c362a
|
@ -379,6 +379,16 @@ bool CGLXManager::activateContext(const SExposedVideoData& videoData, bool resto
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (!restorePrimaryOnZero && !videoData.OpenGLLinux.X11Window && !videoData.OpenGLLinux.X11Display)
|
||||
{
|
||||
if (!glXMakeCurrent((Display*)PrimaryContext.OpenGLLinux.X11Display, None, NULL))
|
||||
{
|
||||
os::Printer::log("Render Context reset failed.");
|
||||
return false;
|
||||
}
|
||||
CurrentContext.OpenGLLinux.X11Window = 0;
|
||||
CurrentContext.OpenGLLinux.X11Display = 0;
|
||||
}
|
||||
// set back to main context
|
||||
else if (CurrentContext.OpenGLLinux.X11Display != PrimaryContext.OpenGLLinux.X11Display)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue