Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-09 Thread Pedro Henrique Linhares
Thank you, I got it, ...very useful! -- Att, Pedro Henrique Linhares. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-09 Thread Greg Ercolano
Pedro Henrique Linhares wrote: > PS: just for the record I tried what Greg told me to do and I still getting > that error.. And I didn't really understand how this parent() method is > suppose to work. How can I create an hierarchy of widgets? Using the > children() method? Or current()->add() meth

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-09 Thread Pedro Henrique Linhares
. > No - you maybe missed my second post on this? Your callback method is >> > > definitely not finding the correct widget to call. > > Your mygl widget is fine - you simply are not calling it. > > > You were right! > > > Though, for the record, your GL code is wrong, too and does not draw >> w

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-09 Thread MacArthur, Ian (SELEX GALILEO, UK)
> PS: just for the record I tried what Greg told me to do and I > still getting > that error.. And I didn't really understand how this parent() > method is > suppose to work. How can I create an hierarchy of widgets? Using the > children() method? Or current()->add() method? I read the > manual

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-09 Thread MacArthur, Ian (SELEX GALILEO, UK)
> Seems to me that when I call the translate() method the > object mygl is no > longer available. No - you maybe missed my second post on this? Your callback method is definitely not finding the correct widget to call. Your mygl widget is fine - you simply are not calling it. I made a few cr

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-08 Thread Greg Ercolano
Pedro Henrique Linhares wrote: > This is what I get from my debugger : > > Program received signal SIGSEGV, Segmentation fault. > 0x080498d3 in MainWindow::translate (this=0x0) at Poligono.cpp:75 > 75 mygl->translate(1.0,1.0,0.0); > (gdb) backtrace > #0 0x080498d3 in MainWindow::translate (t

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-08 Thread Pedro Henrique Linhares
"What do you get when you run it in your debugger? What doe sit show happening?" Imacarthur This is what I get from my debugger : Program received signal SIGSEGV, Segmentation fault. 0x080498d3 in MainWindow::translate (this=0x0) at Poligono.cpp:75 75 mygl->translate(1.0,1.0,0.0); (gdb) ba

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-08 Thread imacarthur
Pedro, Without digging into it more, I think the bug is actually in your MainWindow::translate_cb() method. I'd say that it looks like that is *not* invoking the right callback, but since the casting makes the types "look" right it is attempting to invoke the translate() method of some rand

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-08 Thread imacarthur
On 8 Mar 2010, at 18:38, Pedro Henrique Linhares wrote: > > Following to the imacarthur's suggestion.. I posted my question and > code here: > http://www.gidforums.com/showthread.php?p=86184#post86184 > > Thank you again guys.. Pedro - would help a lot if what you posted was complete enough to

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-08 Thread Pedro Henrique Linhares
"Can you make up a minimal, compileable, example showing how you use this class and post it somewhere, for us to try? Maybe even post it here if it is long too long..." imacarthur Following to the imacarthur's suggestion.. I posted my question and code here: http://www.gidforums.com/showthread.ph

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-07 Thread imacarthur
On 7 Mar 2010, at 20:29, Pedro Henrique Linhares wrote: > > Sorry for this long email.. I'll be glad if someone could give me some > insight and I'm sorry if I'm asking a silly question.. Can you make up a minimal, compileable, example showing how you use this class and post it somewhere, for

Re: [fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-07 Thread Greg Ercolano
Pedro Henrique Linhares wrote: > void MyGlWindow::translate(float tx, float ty, float tz){ > trans = 0; // Doesnt work as if I couldnt access this private > member... > redraw(); // Doesnt work! Why? > } Hmm, that looks fine. Where are you calling translate

[fltk.general] Problem to redraw in the Fl_Gl_Window

2010-03-07 Thread Pedro Henrique Linhares
Hello folks! I am having problems in redrawing the screen where my opengl program is running. I have a Fl_Window that contains a menu bar and inside this window I created a Fl_Gl_Window to display my drawing. It is working properly but I dont know how to redraw the screen. The menu I created shoul