GtkGLArea and signals

2002-03-13 Thread layabouts
Hi, I've just started using GTK and GtkGLArea imparticular, and I've got a problem with signals... I have a callback that is responsible for redrawing the glarea widget when it receives an "expose_event" signal, which works fine when just resizing the window etc. But I also want a mouse motion

Re: GtkGLArea and signals

2002-03-14 Thread Sven Neumann
Hi, [EMAIL PROTECTED] writes: > I've just started using GTK and GtkGLArea imparticular, and I've got a problem with >signals... > > I have a callback that is responsible for redrawing the glarea widget when it >receives an "expose_event" signal, which works fine when just resizing the > windo

Re: GtkGLArea and signals

2002-03-14 Thread layabouts
[EMAIL PROTECTED] wrote: >> Why is it that I can't simply have the glarea widget signal >> itself that it is in need of a refresh? Isn't a widget allowed >> to signal itself? > > if you would emit the signal correctly it would probably work > (you missed to pass a valid GdkEvent to signal_emit).

Re: GtkGLArea and signals

2002-03-14 Thread Paul Davis
>[EMAIL PROTECTED] wrote: >>> Why is it that I can't simply have the glarea widget signal >>> itself that it is in need of a refresh? Isn't a widget allowed >>> to signal itself? >> >> if you would emit the signal correctly it would probably work >> (you missed to pass a valid GdkEvent to signal

Re: GtkGLArea and signals

2002-03-14 Thread layabouts
[EMAIL PROTECTED] wrote: > >I have another signal related problem now - I want to refresh the GL widget > >as soon as it is displayed, otherwise a load of random crap in memory is > >displayed until I (for example) rotate the view with the mouse. I really need > >to force this refresh to occur be

Re: GtkGLArea and signals

2002-03-14 Thread Ralph Walden
Make sure that you're calling glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) somewhere before the image is display. Calling this in the configure_event handler (called when the window is resized, and also the first time before mapping) seems to work for me. Good luck, Ralph Walden [

Re: GtkGLArea and signals

2002-03-15 Thread Paul Davis
>> window till the expose event handler is finished - if there are still >> random bits there when it does, then its your fault, AFAIK. > >My sincerest apologies - I've only had contact with the GTK materials for >a couple of days. In that time I've found the documentation wanting, >especially gi