Date: Tue, 01 Feb 2005 13:09:49 +0100 (CET) Message-Id: <20050201.130949.74734002.oandrieu at nerim.net> To: jon at jdh30.plus.com Cc: lablgtk at math.nagoya-u.ac.jp Subject: Re: Resize problems with GLGTK From: Olivier Andrieu In-Reply-To: <200501280859.53447.jon at jdh30.plus.com> References: <200501280859.53447.jon at jdh30.plus.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Jon, > Jon Harrop [Fri, 28 Jan 2005]: > I'm porting an ocaml program from lablglut to lablgtk2. I am trying > to get a window containing a menu-bar at the top and the rest > dedicated to a GL widget. Then I just need to mimic the > functionality of the glut callbacks (reshape, redisplay, idle, > motion, passive_motion etc.) for the GL widget. > > [...] > > I don't pretend to understand what the implications of the > resize_mode should be but I can't see where I should go from > here. I'd appreciate any constructive criticism! :-) Hmm, IIRC the resize_mode thingy is for widget implementations, I'd say you don't need to fiddle with that. Are you connecting the right signals ? Shouldn't you also/instead connect the #event#configure signal of the GLarea widget ? > While I'm here, can I also get people's thoughts on using GL and > GTK in a commercial application? You'd get more answers if you asked on the corresponding GTK lists I think :), like gtkglext-list : http://mail.gnome.org/mailman/listinfo/gtkglext-list As for ocaml, you could consider writing a GtkGLext binding. There was some discussion on gtk-devel list some time ago, you might want to check what was said : http://mail.gnome.org/archives/gtk-devel-list/2004-January/msg00169.html http://mail.gnome.org/archives/gtk-devel-list/2003-September/msg00220.html http://bugzilla.gnome.org/show_bug.cgi?id=119189 (and the discussion on caml-list in december in case you missed it) Also, mind that the situation could change in a not-too-distant future. GTK+ will soon be using the Cairo library for drawing. Cairo has several backends, including an OpenGL one, so that could somehow change the way to do OpenGL with GTK+. -- Olivier