I thought I would add my two cents. I've been working on a side project for a few months and found out that there are some weird things with Fl_Gl_Window that you might not know. Maybe some documentation could be updated with this, unless I just missed it.
Fl_Gl_Window does not initialize OpenGL until the app is running via Fl::run(). I'm still not sure it it is holding off until the first draw call or what. It relates to textures in a way because you can't generate textures until OpenGL has been initialized. You can see this in glut as well if you try to use glGenTextures before your glutInit* calls. I found this out because I use texture managers and I had it set to load all the textures before Fl::run() and it just didn't work. I would get white squares to show me OpenGL was rendering but no textures. And I tracked it back to glGenTextures not returning expected values. To get around this I had to add to my draw function to check if it was the first loop and load my textures there. I hope this helps you and anyone who might be having similar problems. > Patrick McCarthy wrote: > > Dear Loic, have a look at: > > http://fltk.org/doc-1.0/basics.html#basics > > it is a frequent problem! > > Hmm, does that page cover texture mapping problems? > > Also, looks like the 'hello world' image on that page > is pretty wacked out: > http://fltk.org/doc-1.0/hello.C.gif > > Fortunately those are docs for a really ancient release of FLTK; > the 1.0.x series was put to pasture many years ago. > 1.1.x has been the current stable release for the last 5 or 6 > years at least; so the equivalent page would be here: > http://fltk.org/doc-1.1/basics.html#basics > > Though I don't think that mentions textures either.. _______________________________________________ fltk-opengl mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-opengl
