From 44c943e651bc712a5ee960c84091ef3b17af1760 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Fri, 8 Jan 2010 17:21:03 +0000 Subject: [PATCH] FS#146 - Fix current OpenGL matrix mode not properly saved when PreserveOpenGLStates is activated git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1338 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Graphics/RenderTarget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index f9d9096ad..2dca86676 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -86,10 +86,10 @@ void RenderTarget::Draw(const Drawable& Object) // Save the current render states and set the SFML ones if (myPreserveStates) { - GLCheck(glMatrixMode(GL_MODELVIEW)); GLCheck(glPushMatrix()); - GLCheck(glMatrixMode(GL_PROJECTION)); GLCheck(glPushMatrix()); GLCheck(glPushAttrib(GL_COLOR_BUFFER_BIT | GL_CURRENT_BIT | GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_TRANSFORM_BIT | GL_VIEWPORT_BIT)); + GLCheck(glMatrixMode(GL_MODELVIEW)); GLCheck(glPushMatrix()); + GLCheck(glMatrixMode(GL_PROJECTION)); GLCheck(glPushMatrix()); SetRenderStates(); }