MacArthur, Ian (SELEX GALILEO, UK) schrieb: > >> Is there a special way to connect fl_read_image() to offscreen >> buffer? Maybe the real problem comes from this function? Do I need >> some make_current()? But I'm using the offscreen inside of draw(), >> so drawing should work. > > You need to "begin" the offscreen just before you call > fl_read_image() and "end" it once the read is complete.
" fl read image() Reads an RGB(A) image from the current window or off-screen buffer. " The "or off-screen buffer" part of the documentation should mention the required sequence and possible environment. I didn't find any hint and I went the docs up and down to find what's wrong. > You can do > that pretty much anywhere, not just in a draw method, and that's one > of the "advantages" of using the offscreen approach... Yes, it works like a charm now, without dependency on screen. But it seems to me, it works better outside of draw(), than inside. First I started with exporting from draw(), but this doesn't work reliable, sometimes the draw appears, more often the picture stayed black. But this is no problem, because to me it's a lot more comfortable, to work outside of draw() method. Really nice. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

