Thanks a lot Greg, it was obviously the base Draw Method that were missing.
I am still not very used to FLTK, but I really like it's design.
> Greg Ercolano wrote:
> When defining your own draw() method for subclass of Fl_Window,
> you must call the base class's draw() method, as that handles
> drawing all the children. When you overload draw() for the
> window, you're really taking over ALL aspects of drawing that
> window AND its children. Same for Fl_Group, Fl_Scroll, and
> all other grouping widgets.
Is better to call the base draw before my own code, or the opposite?
what will it change?
Other things...
I was actually definning the main class (FROG_Displayer) to be a FL_Gl_Window,
because I need to load all the openGl Texture in that class, those texture will
be redistibuted to the children window.
But I know (from a previous thread on this forum), that the OpenGl Texture
Loading has to be done in the draw method encapsulated in
if(!valid()){....;valid(1);}
But this do not work with the standard FL_Window...
What should I do in order to allow Gl Loading in this method?
void FROG_Displayer::draw()
{
if(!valid()){
Fl::gl_visual(FL_RGB);
LoadTexture((unsigned int*)&LogoTexture
,FROG_PATH::GetGlobalPath("Resources/Frog_Logo.png"
,AbsolutePath.c_str()).c_str());
valid(1);
}
Fl_Window::draw();
}
Thanks again for help,
And sorry to ask stupid questions...
Loic,
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk