Re: [GtkGLExt] Creating a new widget type vs. modifying an instance of an existing type
- From: Braden McDaniel <braden endoframe com>
- To: alif wahid gmail com
- Cc: gtkglext-list gnome org
- Subject: Re: [GtkGLExt] Creating a new widget type vs. modifying an instance of an existing type
- Date: Sat, 01 Jan 2005 00:22:01 -0500
On Sat, 2005-01-01 at 16:50 +1300, Alif Wahid wrote:
> I've had a look at the code.
Thanks!
> The GtkGLExt related part makes sense.
> However, I don't understand the full sequence of function calls inside
> the "expose_event" callback.
>
> Usually the front and back buffers are swapped before exiting from the
> "expose_event" callback as we do in the example programs. In your case,
> the "redraw" method is called on the GtkGLView class. I presume that
> that method will subsequently call its fellow "swap_buffers" method?
Correct. This code is in "src/libopenvrml-gl/openvrml/gl/viewer.cpp".
> Also, in the "post_redraw" method, you use the "gtk_widget_queue_draw"
> function. I recall sometime ago that Naofumi recommended and changed all
> the example programs to use the following two function calls instead
> after someone reported a bug of some sort.
>
> /* Invalidate the whole window. */
> gdk_window_invalidate_rect (widget->window, &widget->allocation, FALSE);
>
> /* Update synchronously. */
> gdk_window_process_updates (widget->window, FALSE);
>
> It might be worth trying these as well.
At one point using that pair of functions made Mozilla very unhappy;
however, that may only have been a side effect of me doing some other
things wrong. When I tried that just now, I see no discernible
difference in behavior (that is, I still see the delay).
> I just get the feeling something funny is happening when you're using
> GtkPlug. I don't think we've ever tested GtkGLExt with GtkPlug. You
> definitely need someone with intricate knowledge of Mozilla and Gtk
> interactions and unfortunately that's not me. Sorry :(
I've e-mailed Chis Blizzard, who probably knows more about Mozilla's use
of GTK than anyone else. I know he's responsible for the availability of
GtkPlug through the plug-in API. Hopefully he'll be able to tell me
something.
Of note is that I'm not quite using GtkPlug in the "normal" sense. That
is, it's main job (or so I gather) is to support an out-of-process
widget. While I think it *should* be perfectly usable in the
configuration I'm using it, it's entirely possible that other code
interacting with the GtkPlug may not be fully prepared for the
repercussions of it supporting an in-process widget. It may be that I'd
save myself a lot of grief by making my plug-in out-of-process. I didn't
do that in the first place in the hope that I could avoid the grief of
IPC. Perhaps I did not choose my poison wisely.
PS: Happy new year!
--
Braden McDaniel e-mail: <braden endoframe com>
<http://endoframe.com> Jabber: <braden jabber org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]