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
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
[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).
>[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
[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
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
[
>> 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