Various improvements on OpenGL contexts handling

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1245 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2009-10-27 09:20:20 +00:00
parent 31b72b6385
commit 17190bd158
21 changed files with 217 additions and 225 deletions

View file

@ -17,9 +17,6 @@ int main()
// Create the main window
sf::Window window(sf::VideoMode(640, 480, 32), "SFML Window");
// Activate it as the target for OpenGL calls
window.SetActive();
// Create a clock for measuring the time elapsed
sf::Clock clock;
@ -56,7 +53,9 @@ int main()
glViewport(0, 0, event.Size.Width, event.Size.Height);
}
// Activate the window
// Activate the window before using OpenGL commands.
// This is useless here because we have only one window which is
// always the active one, but don't forget it if you use multiple windows
window.SetActive();
// Clear color and depth buffer