> > I tried doing some test with opengl (as the documentation > says it's possible to use opengl to draw inside a widget) but > the opengl image just flashes and disappears suddenly. Is it > actually possible to draw a widget with openGL? Can someone > give me a small example? > > OpenGL example programs are in the 'test' directory of the > official FLTK distro. There are not OpenGL widgets yet, but > it is possible and requires only a little trick. After that, > *all* widgets in that window need to be drawn with OpenGL > though. The next version of FLTK will support OpenGL drawing > for widgets.
If you are really keen on rendering your widgets like this, then I'd suggest that instead of using GL to render your widget you try Cairo instead. That would allow you to define your widget as a vector drawing rather than a pixmap, and have Cairo deal with the scaling, rotation, alpha, etc for you. Also, Cairo will do quite nice lighting stuff, but can be "lighter" than GL, and can do a nice job of rendering widgets and stuff. I guess in an ideal case you could define your widgets as SVG and have them render and scale accordingly. Though there might be a *little* bit of work in getting that to fly... We don't have that working "out of the box", shall we say... SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
