diff --git a/src/screenComponents/rotatingModelView.cpp b/src/screenComponents/rotatingModelView.cpp index 63b3971e70..4bb7c80d98 100644 --- a/src/screenComponents/rotatingModelView.cpp +++ b/src/screenComponents/rotatingModelView.cpp @@ -28,7 +28,7 @@ void GuiRotatingModelView::onDraw(sf::RenderTarget& window) if (rect.width <= 0) return; if (!model) return; - window.pushGLStates(); + window.popGLStates(); float camera_fov = 60.0f; float sx = window.getSize().x * window.getView().getViewport().width / window.getView().getSize().x; @@ -123,6 +123,6 @@ void GuiRotatingModelView::onDraw(sf::RenderTarget& window) sf::Shader::bind(NULL); glDisable(GL_DEPTH_TEST); - window.popGLStates(); + window.pushGLStates(); #endif//FEATURE_3D_RENDERING } diff --git a/src/screenComponents/viewport3d.cpp b/src/screenComponents/viewport3d.cpp index 9e0a1a32b1..8f7ad94dfc 100644 --- a/src/screenComponents/viewport3d.cpp +++ b/src/screenComponents/viewport3d.cpp @@ -35,7 +35,7 @@ void GuiViewport3D::onDraw(sf::RenderTarget& window) soundManager->setListenerPosition(my_spaceship->getPosition(), my_spaceship->getRotation()); else soundManager->setListenerPosition(sf::Vector2f(camera_position.x, camera_position.y), camera_yaw); - window.pushGLStates(); + window.popGLStates(); ShaderManager::getShader("billboardShader")->setParameter("camera_position", camera_position); @@ -300,7 +300,7 @@ void GuiViewport3D::onDraw(sf::RenderTarget& window) } #endif - window.popGLStates(); + window.pushGLStates(); if (show_callsigns && render_lists.size() > 0) {