Skip to content
Snippets Groups Projects
Commit b465a28f authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fix drawing on another window to generate bitmap files on linux

parent 0a8b3631
No related branches found
No related tags found
No related merge requests found
......@@ -152,6 +152,11 @@ static PixelBuffer *GetCompositePixelBuffer(GLenum format, GLenum type)
(FlGui::instance()->getCurrentOpenglWindow()->getDrawContext());
newg->show();
openglWindow::setLastHandled(newg);
//waiting for the os to really make the window visible and to call the "draw" function
//on (some ?) linux if we do not wait here, the window is not ready
//and the picture cannot be generated
while(!newg->valid())
Fl::wait();
}
PixelBuffer *buffer;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment