First off, the Gtk docs are probably the best source for these questions. Second up are the examples.
On Wed, 2006-04-26 at 00:08 -0700, Andrew Speirs wrote: > Sorry if this is a bit of a newbie question, but I've > only just started playing with gtkglextmm, and I can't > find much in the various documentation. > In e.g. simple.cc, the Gtk::GL:DrawingArea has > on_realize() and on_configure_event() member > functions. My guess is the former is called when the > object is created (instantiated) Yes. > and the latter is > called (immediately? Don't know, but I think so. > ) afterwards to set the properties > of the object. Yes. > Is the on_realize() called only once per object? Yes. > Is the on_configure_event() called anytime the > object's properties are changed e.g. a window resize? Yes. > Are there guidelines as to what to put into these > functions? get_gl_context() will not work until on_realize() is called (I could have that wrong - it might be get_gl_drawable() that returns a NULL Glib::RefPtr<>. Point being, no GL calls will have any effect until the on_realize signal has been delivered). If you override on_realize() in a child, you must call the parent's impl as the first task in the child. It is common to call glViewPort() in on_configure(), but not required. HTH, -Jonathan _______________________________________________ gtkglext-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkglext-list
