Skip to content

Commit

Permalink
Merge pull request #591 from amir-arad/patch-2
Browse files Browse the repository at this point in the history
upgrade to sfml 2.5
  • Loading branch information
daid authored Nov 11, 2018
2 parents 7af5670 + bd6ffaf commit e0b7114
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/screenComponents/rotatingModelView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions src/screenComponents/viewport3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -300,7 +300,7 @@ void GuiViewport3D::onDraw(sf::RenderTarget& window)
}
#endif

window.popGLStates();
window.pushGLStates();

if (show_callsigns && render_lists.size() > 0)
{
Expand Down

0 comments on commit e0b7114

Please sign in to comment.