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:
parent
8ba9495c02
commit
c237305f9b
58 changed files with 890 additions and 2039 deletions
|
@ -70,11 +70,9 @@ namespace sample_opengl
|
|||
window.Clear();
|
||||
|
||||
// Draw 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
|
||||
|
@ -134,7 +132,9 @@ namespace sample_opengl
|
|||
Gl.glEnd();
|
||||
|
||||
// Draw some text on top of our OpenGL object
|
||||
window.SaveGLStates();
|
||||
window.Draw(text);
|
||||
window.RestoreGLStates();
|
||||
|
||||
// Finally, display the rendered frame on screen
|
||||
window.Display();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue