On 26/03/11 09:53, Manolo Gouy wrote:
>> There's one weird side effect when using GL subwindows, though: if you
>> draw a string in the GL window before deleting it, and you draw the same
>> string in the new GL window that replaces it, the string is drawn as a
>> solid color rectangle.
>>
>> I guess there's a caching issue (are the textures e.g. linked to a
>> given GL context via a display list)?
>
> Yes, the code attempts to re-use the pre-computed texture on the
> new window, and it fails.
> Because I know nothing of OpenGL, it's very difficult for me
> to debug that. Could you help ?

I've had a look at the fltk code, and I think that the easiest fix is to 
force the recomputation of the texture pile.

In my own code I just tested the following, which works: after deleting 
the original GL subwindow just call

   gl_texture_pile_height(gl_texture_pile_height());

Maybe we could force a reset of the texture pile in the destructor of a 
GL window?

Christophe
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to