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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id D0E1D7F860 for ; Mon, 17 Mar 2014 15:05:54 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQQAGIAJ1NKN1ZKnGdsb2JhbABZg0GCPYEgt0uHMIEuDgEBAQEBBg0JCRQogiUBAQEEAQIgVhALGAICIwMCAigeARAGEwiHcQQJsC6iKReBKYxnJTMHgm81gRQElW+ECYUDF48RgWg X-IPAS-Result: AsQQAGIAJ1NKN1ZKnGdsb2JhbABZg0GCPYEgt0uHMIEuDgEBAQEBBg0JCRQogiUBAQEEAQIgVhALGAICIwMCAigeARAGEwiHcQQJsC6iKReBKYxnJTMHgm81gRQElW+ECYUDF48RgWg X-IronPort-AV: E=Sophos;i="4.97,670,1389740400"; d="scan'208";a="52984595" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail3-smtp-sop.national.inria.fr with ESMTP; 17 Mar 2014 15:05:53 +0100 Received: from [172.20.10.2] (33-237.197-178.cust.bluewin.ch [178.197.237.33]) by smtp.webfaction.com (Postfix) with ESMTP id 0398D2160D5B; Mon, 17 Mar 2014 14:05:50 +0000 (UTC) Date: Mon, 17 Mar 2014 15:05:46 +0100 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: Rich Neswold Cc: "=?utf-8?Q?caml-list=40inria.fr?=" Message-ID: <3B63CC7A2A994E018E1EC2E450E0FFF4@erratique.ch> In-Reply-To: References: <1732E7D3-C154-4305-90C8-0CC292FE08CF@gmail.com> <8738ihru8r.fsf@golf.niidar.ru> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Caml-list] OpenGL and LWT Le lundi, 17 mars 2014 =C3=A0 14:39, Rich Neswold a =C3=A9crit : > On Mon, Mar 17, 2014 at 5:32 AM, Ivan Gotovchits wrote: > > Unfortunately, I don't know how LabGL is organized. >=20=20 > Most OpenGL bindings (including LabGL) include 'libglut', which is a > library that is bundled with OpenGL that opens a UI window with an > OpenGL context in it. It would be nice to use this library because it > hides these details (i.e. the same code runs on Unix and MacOSX and > Windows.) Unfortunately, the way libglut works is you call main_loop() > which never returns. Before calling main_loop(), you register > callbacks for mouse and keyboard events. You can also register a > callback for periodic timeouts. Lastly, there's a callback which gets > called whenever the libglut main loop is "idle" (with unspecified > latencies, frequency, or guarantees.) I wouldn't use glut which is no longer bundled on osx, is quite limited in = functionality and reclaims your main loop. Use SDL, it provides similar fun= ctionality to setup an OpenGL context in a platform independent way but it = doesn't reclaim control on your main() which will make integration with lwt= trivial. There is:=20=20 http://ocamlsdl.sourceforge.net/home.html I also wrote newer and lower level bindings that target SDL2, they are not = released yet but are becoming stable see: https://sympa.inria.fr/sympa/arc/caml-list/2013-12/msg00105.html (the heisenbug on osx mentioned in that message can be solved see [1]).=20= =20 Best, Daniel [1] http://lists.ocaml.org/pipermail/ctypes/2014-February/000066.html