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-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: OpenGL in Ada Date: Wed, 06 Oct 2010 21:52:59 -0400 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 7 Oct 2010 01:53:02 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="60RAy+MV5MGUhMnUUJoOPg"; logging-data="27032"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183dZyV89cvUF1LafarBZM0" User-Agent: Thunderbird 2.0.0.24 (X11/20100623) In-Reply-To: Cancel-Lock: sha1:Nfffg++91d66SYwbP3mglV9blk8= Xref: g2news1.google.com comp.lang.ada:14419 Date: 2010-10-06T21:52:59-04:00 List-Id: 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 > http://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: > http://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. Even the OpenGL definition recognizes that the "C naming convention" is only 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. I've never found a good solution.) --BrianG