From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9625531bdb853f2a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.74.201 with SMTP id w9mr10333415pbv.0.1328655654357; Tue, 07 Feb 2012 15:00:54 -0800 (PST) Path: lh20ni272065pbb.0!nntp.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news.stack.nl!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: what is current status of OpenGL and Ada? Date: Tue, 07 Feb 2012 18:00:50 -0500 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Injection-Date: Tue, 7 Feb 2012 23:00:53 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="TtuQlFl1tCpi+XZRA9iuwg"; logging-data="9220"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XCBfxEWWJInfpM795iN4r" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 In-Reply-To: Cancel-Lock: sha1:cDsfHzT/FEsGC6lygHo9Dfp6/hQ= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: 2012-02-07T18:00:50-05:00 List-Id: On 02/06/2012 11:23 PM, Yannick DuchĂȘne (Hibou57) wrote: > Le Tue, 07 Feb 2012 02:33:49 +0100, BrianG a Ă©crit: >> (I occasionally return to my attempt to build a binding, based on the >> 'Red Book', but it doesn't hold enough interest for me to keep at it >> very long. I did learn that you can't use a single name for all >> versions of a function - because then you can't call it with all >> literal parameters {there's no way to resolve the short/long or >> float/double versions}. At a minimum, you need 2 names; I prefer to >> use the 2nd for the literal case, but never came up with a reasonable >> naming convention.) > > Or else four packages with static genericity. > > package OpenGL.With_Shorts is > function F1 (Param1 : Short, ...); > function F2 (Param1 : Short) > function F2 return Short; > ... > end ...; > > package OpenGL.With_Longs is > function F1 (Param1 : Long, ...); > function F2 (Param1 : Long) > function F2 return Long; > ... > end ...; > > And so on. > Yes, and that might be one good way to organize the bindings. I presume that a typical program would tend to use one 'flavor' of number more-or-less consistently. One thing I would like is to a way to organize the package structure in a way that makes _using_ it easier. Most OpenGL programs I've looked at, which isn't many, with (or #include) all/most parts of the library structure, because it was organized for the library _writer's_ benefit. (This probably applies to most large, structured libraries). -- --- BrianG 000 @[Google's email domain] .com