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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,75fb93409baf1e22 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!postnews.google.com!h7g2000yqn.googlegroups.com!not-for-mail From: Yves Bailly Newsgroups: comp.lang.ada Subject: Re: OpenGL in Ada Date: Thu, 7 Oct 2010 15:06:28 -0700 (PDT) Organization: http://groups.google.com Message-ID: <758b1bff-3e51-4840-b4ba-0773da525d0e@h7g2000yqn.googlegroups.com> References: NNTP-Posting-Host: 82.242.195.245 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1286563148 30713 127.0.0.1 (8 Oct 2010 18:39:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 8 Oct 2010 18:39:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h7g2000yqn.googlegroups.com; posting-host=82.242.195.245; posting-account=bq4tKgoAAACL_Bm1LT74t0bhFtiukbrL User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.3 (KHTML, like Gecko) konqueror/4.5.1 Safari/533.3,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14436 Date: 2010-10-07T15:06:28-07:00 List-Id: On Oct 7, 3:52=A0am, BrianG wrote: > Gautier write-only wrote: > > Yves Bailly: > > >> The OpenGL subprograms are named according to the usual C naming > >> scheme ("glBegin", "glVertex3d" and so on), so the result looks more > >> like C than like Ada, but at least it allows to read tutorials more > >> easily (as most of them are based on C). So the generated binding is > >> rather low-level (I think "thin binding" is the appropriate wording). > > > If you want to see a GL binding with Ada names, visit this > > =A0http://globe3d.sf.net/ > > There is somewhere among the tools a gl_overloader that produces > > different "Vertex" instead of C's "glVertex3d", "glVertex3f", etc. > > like here: > > =A0http://globe3d.sf.net/g3d_html/gl__ads.htm#3346_13 > > You can perhaps combine it with your binding generator. > > I would strongly recommend using an Ada-type naming convention. =A0Even > the =A0OpenGL definition recognizes that the "C naming convention" is onl= y > due to C's limitations and recommends using a "real" naming with real > languages (see the Red Book - ok, the "real languages" part is my wording= ). > > Someone trying to use a tutorial ought to be able to understand the > change from "glVertex3i(x,y,z)" to "GL.Vertex(x, y, z : Int)". > > (Of course there is a problem with overloading multiple integral and > real versions - calls with only literal arguments need some kind of > kludge. =A0I've never found a good solution.) Well, I guess tastes vary on this subject... at least the "gl" prefix could be removed (or not, according to a command-line option). About the overloading, maybe things like "GL.Vertexi(x, y: Int)" and "GL.Vertexf(x, y: Float)", i.e. with a suffix, would be acceptable? That said, "glVertex*()" is deprecated in recent OpenGL versions ;-)