Commit 81dcb260 authored by Martin Schultz's avatar Martin Schultz

Merge branch 'fixGLErrorOnSnapshot' into 'unstable'

fixed #3 by moving the call to make current to the top of snapshot

See merge request !36
parents 118bb540 14b58a3a
......@@ -2200,7 +2200,8 @@ void glViewer::slotPropertiesUpdated() {
}
void glViewer::snapshot(QImage& _image, int _width, int _height, bool _alpha, bool _hideCoordsys, int samples) {
makeCurrent();
int w = 0, h = 0, bak_w = 0, bak_h = 0, left = 0, bottom = 0;
glstate_->push_modelview_matrix();
......@@ -2240,7 +2241,6 @@ void glViewer::snapshot(QImage& _image, int _width, int _height, bool _alpha, bo
// it will fall back to the maximal supported number of samples
format.setSamples(samples);
makeCurrent();
QFramebufferObject fb(w,h,format);
if ( fb.isValid() ){
......
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