[GtkGLExt] Creating a new widget type vs. modifying an instance of an existing type
- From: Braden McDaniel <braden endoframe com>
- To: gtkglext-list gnome org
- Subject: [GtkGLExt] Creating a new widget type vs. modifying an instance of an existing type
- Date: Fri, 31 Dec 2004 05:21:11 -0500
My initial approach to using GtkGLExt in my Mozilla plug-in involved
creating a new widget type inheriting GtkDrawingArea and giving it GL
capabilities in the widget's _init function. There are user input events
I need to respond to (e.g., button-press-event), and I set functions for
these events for the widget class.
For various reasons I thought it better to change this approach to one
where I simply use GtkDrawingArea directly and add GL capabilities and
event callbacks to it when I construct it. This involved little more
than moving some code around; and I had assumed that the user-visibible
effect of this change would be nil. However, this appears to have had a
significant impact on performance. Now when pressing a mouse button over
the widget there is a significant delay before the widget response,
where before it was virtually instantaneous. I'm also observing some
crashes since making this change that suggest the event callbacks are
now occurring on a different thread from before--surprising, but perhaps
only because I don't know GTK well enough.
Can anyone offer any insight into this?
--
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]