From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id A95627F860 for ; Mon, 17 Mar 2014 23:50:23 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rich.neswold@gmail.com) identity=pra; client-ip=209.85.223.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich.neswold@gmail.com"; x-sender="rich.neswold@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of rich.neswold@gmail.com designates 209.85.223.175 as permitted sender) identity=mailfrom; client-ip=209.85.223.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich.neswold@gmail.com"; x-sender="rich.neswold@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f175.google.com) identity=helo; client-ip=209.85.223.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich.neswold@gmail.com"; x-sender="postmaster@mail-ie0-f175.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArwBACl7J1PRVd+vlGdsb2JhbABahx6/E4EjFg4BAQEBBwsLCRIqgiUBAQEDASMdARsdAQMBCwYFCw0CAiYCAiMRAQUBHAYTh2QBAwkIBaRzjA5Rgw6WegoZJw1khlYRAQUMgR2FTYcaJTMHgm81gRQEiVKOdIZMiXZBhHiBSw X-IPAS-Result: ArwBACl7J1PRVd+vlGdsb2JhbABahx6/E4EjFg4BAQEBBwsLCRIqgiUBAQEDASMdARsdAQMBCwYFCw0CAiYCAiMRAQUBHAYTh2QBAwkIBaRzjA5Rgw6WegoZJw1khlYRAQUMgR2FTYcaJTMHgm81gRQEiVKOdIZMiXZBhHiBSw X-IronPort-AV: E=Sophos;i="4.97,673,1389740400"; d="scan'208";a="63341887" Received: from mail-ie0-f175.google.com ([209.85.223.175]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Mar 2014 23:50:22 +0100 Received: by mail-ie0-f175.google.com with SMTP id to1so6241535ieb.20 for ; Mon, 17 Mar 2014 15:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=4PZVkqpViQdonrd+TIy1tycZa96ZTSKsDEaMRXDjvIk=; b=Ehs64SzWuKSeTRKoegrsnrz4+L1t3xZwYi6YDxLh2eE/TWjmKAUg2yf5Di2nj48bar Pwtt1Hszs+mIZa9q5IaP7aQ1pM6yCeGfORW61cijWuF71ILJRF8t7iXW9yHkQsuC2tYu ZL0ownIw9PavcQmKJ5vs29j1eP7a7CeeepgfpgefWHr4LxbUtoN0O1HcNwpC1dNzu3FR oq3hCI15mBsYORxDuRKQqlfZMooFfBT6UKW0AunMJwU7Iu0hwDnLF9uLq+9zEGoJ0xzM ekLGYJZx+WZ00G+mnHufw2HiLo68w8NC1PNOGsbbiKqGPKsrf8XhVD9iLbk0h3W2t1Kk oKhA== X-Received: by 10.42.33.65 with SMTP id h1mr2815602icd.72.1395096621603; Mon, 17 Mar 2014 15:50:21 -0700 (PDT) Received: from [192.168.1.161] (c-98-226-41-18.hsd1.il.comcast.net. [98.226.41.18]) by mx.google.com with ESMTPSA id kb5sm22577358igb.1.2014.03.17.15.50.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 15:50:20 -0700 (PDT) References: <1732E7D3-C154-4305-90C8-0CC292FE08CF@gmail.com> <8738ihru8r.fsf@golf.niidar.ru> <3B63CC7A2A994E018E1EC2E450E0FFF4@erratique.ch> Mime-Version: 1.0 (1.0) In-Reply-To: <3B63CC7A2A994E018E1EC2E450E0FFF4@erratique.ch> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <2F20BDD4-4475-4250-921F-E4CDB34BFD86@gmail.com> Cc: caml-list@inria.fr X-Mailer: iPad Mail (11D167) From: Richard Neswold Date: Mon, 17 Mar 2014 17:50:20 -0500 To: =?utf-8?Q?Daniel_B=C3=BCnzli?= Subject: Re: [Caml-list] OpenGL and LWT > On Mar 17, 2014, at 9:05 AM, Daniel B=C3=BCnzli wrote: > I wouldn't use glut which is no longer bundled on osx, is quite limited i= n functionality and reclaims your main loop. Use SDL, it provides similar f= unctionality to setup an OpenGL context in a platform independent way but i= t doesn't reclaim control on your main() which will make integration with l= wt trivial. The SDL libraries look much better to use. Thanks for the suggestion! Sorry, though. I'm still not fully understanding how to interface the two. = I see that, in SDL, I can call Tsdl.Sdl.wait_event to block and wait for ev= ents to get posted. But in what context should I call this function? In my = LWT environment, this would block the entire application. Lwt.Async threads= would also do that. I could use 'detach' to use an OS thread, but then I'm= back to the same problem as libglut: a secondary thread needs to communica= te with the main LWT environment which itself can't make SDL calls since th= e secondary thread "owns" the SDL context. I could have an Lwt thread call Sdl.poll_event and then go to sleep if no e= vents were available, but I'm trying to make this driven by events and not = resort to polling, if possible. I must be missing some detail in getting these libraries to work together t= rivially. Sorry for my misunderstanding. -- Rich=