From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id EB3E4BC69 for ; Fri, 9 Mar 2007 01:14:27 +0100 (CET) Received: from ipmail03.adl2.internode.on.net (ipmail03.adl2.internode.on.net [203.16.214.135]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l290EP5H022027 for ; Fri, 9 Mar 2007 01:14:26 +0100 Received: from ppp19-103.lns2.syd7.internode.on.net (HELO [192.168.1.201]) ([59.167.19.103]) by ipmail03.adl2.internode.on.net with ESMTP; 09 Mar 2007 10:44:23 +1030 X-IronPort-AV: i="4.14,264,1170595800"; d="scan'208"; a="60080668:sNHT25344809" Subject: Re: [Caml-list] Interactive technical computing From: skaller To: Vu Ngoc San Cc: Jon Harrop , caml-list@yquem.inria.fr In-Reply-To: <45F08008.8050800@ujf-grenoble.fr> References: <200703080113.22721.jon@ffconsultancy.com> <45EFFABC.1020509@ujf-grenoble.fr> <200703081243.35432.jon@ffconsultancy.com> <45F08008.8050800@ujf-grenoble.fr> Content-Type: text/plain Date: Fri, 09 Mar 2007 11:14:18 +1100 Message-Id: <1173399258.6613.66.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 45F0A6E1.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0100,:01 toplevel:01 mainloop:01 bug:01 bug:01 optimise:01 sourceforge:01 wrote:01 caml-list:01 interaction:02 opengl:02 implicit:03 library:03 hack:04 thu:05 On Thu, 2007-03-08 at 22:28 +0100, Vu Ngoc San wrote: > If you really need interaction in the window and in the toplevel at the > same time, you can launch the sdl mainloop in a separate thread. It > really works. No it doesn't. It works on Linux, but not on Windows. Messages on Windows go to the thread that creates the window, and fetches are done by default on the current thread's message queue. X maintains a queue per process, so it works on Linux (but be careful because even re-entrant X isn't really re-entrant). SDL has a serious design bug: it can't be used as a library, it insists on providing the mainline (you can hack around this though). On Linux, you don't have to do this because the SDL mainline does nothing. OpenGL has an even more serious design bug: contexts are implicit. This is extremely bad design: it was designed to work with serial code and optimise use of a single video card. -- John Skaller Felix, successor to C++: http://felix.sf.net