Commit db43a2cb authored by Ellen Dekkers's avatar Ellen Dekkers

Push and pop modelview and projection matrices when making a snapshot

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10462 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a44448bc
......@@ -2182,6 +2182,9 @@ void glViewer::snapshot(QImage& _image, int _width, int _height, bool _alpha, bo
int w = 0, h = 0, bak_w = 0, bak_h = 0, left = 0, bottom = 0;
glstate_->push_modelview_matrix();
glstate_->push_projection_matrix();
// Get viewport data
glstate_->get_viewport(left, bottom, w, h);
......@@ -2268,8 +2271,12 @@ void glViewer::snapshot(QImage& _image, int _width, int _height, bool _alpha, bo
// Reset viewport to former size
glstate_->viewport(left, bottom, bak_w, bak_h);
}
glstate_->pop_modelview_matrix();
glstate_->pop_projection_matrix();
}
void glViewer::snapshot( int _width, int _height, bool _alpha )
{
QImage image;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment