Removed all the automatic batching stuff and replaced it with a more straight-forward implementation using a state cache for optimizing performances

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1362 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-01-19 20:39:32 +00:00
parent 8ba9495c02
commit c237305f9b
58 changed files with 890 additions and 2039 deletions

View file

@ -78,11 +78,9 @@ int main()
}
// Draw the background
window.SaveGLStates();
window.Draw(background);
// Flush the window, to make sure that our OpenGL cube
// will be rendered on top of the background sprite
window.Flush();
window.RestoreGLStates();
// Activate the window before using OpenGL commands.
// This is useless here because we have only one window which is
@ -141,10 +139,12 @@ int main()
glEnd();
// Draw some text on top of our OpenGL object
window.SaveGLStates();
sf::Text text("SFML / OpenGL demo");
text.SetPosition(250.f, 450.f);
text.SetColor(sf::Color(255, 255, 255, 170));
window.Draw(text);
window.RestoreGLStates();
// Finally, display the rendered frame on screen
window.Display();