New try to fix the ATI & OpenGL contexts bug

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1570 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-09-17 16:46:35 +00:00
parent 36f9cf6cc1
commit 19cb364afe
3 changed files with 5 additions and 18 deletions

View File

@ -123,8 +123,9 @@ bool GlContext::SetActive(bool active)
if (MakeCurrent())
{
// If this is the first context to be activated on this thread, make
// it the reference context for the whole thread
if (!threadContext)
// it the reference context for the whole thread.
// referenceContext must *not* be the threadContext of the main thread
if (!threadContext && (this != &referenceContext))
threadContext = this;
return true;

View File

@ -62,14 +62,7 @@ myOwnsWindow(true)
CreateContext(shared, VideoMode::GetDesktopMode().BitsPerPixel, ContextSettings(0, 0, 0));
// Activate the context
if (shared)
SetActive(true);
// -- Warning --
// The "if (shared)" condition fixes this bug:
// http://www.sfml-dev.org/forum/viewtopic.php?p=20767#20767
// However, it was already there before and removed at revision 1236,
// but without any comment... so it might cause other problems in the future
}

View File

@ -59,14 +59,7 @@ myOwnsWindow (true)
CreateContext(shared, VideoMode::GetDesktopMode().BitsPerPixel, ContextSettings(0, 0, 0));
// Activate the context
if (shared)
SetActive(true);
// -- Warning --
// The "if (shared)" condition fixes this bug:
// http://www.sfml-dev.org/forum/viewtopic.php?p=20767#20767
// However, it was already there before and removed at revision 1236,
// but without any comment... so it might cause other problems in the future
}