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:
parent
36f9cf6cc1
commit
19cb364afe
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user