Fixed a bug with threads and OpenGL context sharing

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1567 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-09-14 18:59:30 +00:00
parent 6de9ea8a0f
commit d35fc89512
3 changed files with 17 additions and 3 deletions

View File

@ -63,7 +63,7 @@ public :
/// \param color Fill color to use to clear the render target
///
////////////////////////////////////////////////////////////
void Clear(const Color& color = Color(0, 0, 0));
void Clear(const Color& color = Color(0, 0, 0, 255));
////////////////////////////////////////////////////////////
/// \brief Draw an object into the target

View File

@ -62,7 +62,14 @@ 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,7 +59,14 @@ 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
}