Added automatic batching to improve performances
Moved the ConvertCoords function from RenderWindow to RenderTarget git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1221 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
1852614e16
commit
565172fc75
51 changed files with 2835 additions and 865 deletions
|
@ -17,6 +17,9 @@ 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;
|
||||
|
||||
|
@ -53,11 +56,6 @@ int main()
|
|||
glViewport(0, 0, event.Size.Width, event.Size.Height);
|
||||
}
|
||||
|
||||
// Set the active window before using OpenGL commands
|
||||
// It's useless here because the active window is always the same,
|
||||
// but don't forget it if you use multiple windows
|
||||
window.SetActive();
|
||||
|
||||
// Clear color and depth buffer
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue