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=2.0 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,43d910f082521047 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.224.219.205 with SMTP id hv13mr5068991qab.5.1344218887120; Sun, 05 Aug 2012 19:08:07 -0700 (PDT) Received: by 10.180.95.2 with SMTP id dg2mr859494wib.2.1344218886977; Sun, 05 Aug 2012 19:08:06 -0700 (PDT) Received: by 10.216.84.129 with SMTP id s1mr460314wee.2.1344218884559; Sun, 05 Aug 2012 19:08:04 -0700 (PDT) Received: by 10.66.76.38 with SMTP id h6mr588297paw.15.1344146358352; Sat, 04 Aug 2012 22:59:18 -0700 (PDT) Path: c6ni54368483qas.0!nntp.google.com!r1no3606983qas.0!news-out.google.com!n2ni63956523win.0!nntp.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!newspeer1.nac.net!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!u3no3435357qai.0!news-out.google.com!q11ni60442355wiw.1!nntp.google.com!r1no3605764qas.0!news-out.google.com!p10ni12304293pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!tomockey.ddo.jp!news.unit0.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: questions on Ada openGL binding in the GLOBE3D packages Date: Thu, 02 Aug 2012 04:14:15 -0500 Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: nma@12000.org NNTP-Posting-Host: 9ii5QNw33OfeoTzEH8w9ug.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 3101 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Date: 2012-08-02T04:14:15-05:00 List-Id: On 8/2/2012 3:50 AM, Egil H�vik wrote: > From the OpenGL spec: > "The declarations shown in this document apply to ANSI C. >Languages such as C++ and Ada that allow passing of argument type information >admit simpler declarations and fewer entry points." > > So no, the names in an Ada-binding does not have to exactly match the C version. I know they do NOT HAVE TO be the same as C. That is my point. They do NOT have to, yes, but it is _better_ if they DO. Why not keep the names the same? It will make it easier to program this in Ada if the binding is the same. > As for GL_Begin and GL_End, they should have been called just Begin and End, but > those are reserved words in Ada. > NO, they should have been called the same as C. glBegin and glEnd. No need to make up new names. The names are already defined. Why chop off anything. Btw, I just downloaded at the other Ada openGL now http://adaopengl.sourceforge.net/downloads.php and I see that the binding there is the SAME as C binding, which is good. So I am looking at it now. Here is an example from the file adaopengl\opengl.ads in the above zip file: ------------------------------- -- Copyright (c) 2002-2003, David Holm -- All rights reserved. ..... pragma Import (C, glBegin, "glBegin"); pragma Import (C, glEnd, "glEnd"); pragma Import (C, glVertex2d, "glVertex2d"); pragma Import (C, glVertex2f, "glVertex2f"); ---------------------------------- You can see, the Ada binding above matchs the same as the C API. Even with the mixed case on the Ada side. I would have liked to use the GLOBE3D openGL binding, because my understanding it is more updated than the David Holm one which was last updated in 2002. But it is more important for me to use a binding which has the same exact names as C as I use C book to learn openGL and I like the code to look the same. This was the case with the Fortran binding as well, it have the same exact API naming as C. So, I see no reason at all to change the name of the functions, even though I know it is allowed. regards, --Nasser