comp.lang.ada
 help / color / mirror / Atom feed
From: Yves Bailly <yves.bailly@gmail.com>
Subject: Re: OpenGL in Ada
Date: Thu, 7 Oct 2010 15:06:28 -0700 (PDT)
Date: 2010-10-07T15:06:28-07:00	[thread overview]
Message-ID: <758b1bff-3e51-4840-b4ba-0773da525d0e@h7g2000yqn.googlegroups.com> (raw)
In-Reply-To: i8j95u$qco$1@news.eternal-september.org

On Oct 7, 3:52 am, BrianG <briang...@gmail.com> 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
> >  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.)

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 ;-)



  reply	other threads:[~2010-10-07 22:06 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 21:23 OpenGL in Ada Yves Bailly
2010-10-06  3:45 ` anon
2010-10-06  5:10   ` Yves Bailly
2010-10-06  9:51     ` Alex R. Mosteo
2010-10-06 10:38       ` Yves Bailly
2010-10-06 10:59         ` Ludovic Brenta
2010-10-06 16:07           ` Pascal Obry
2010-10-06 17:32             ` Yves Bailly
2010-10-06  8:38 ` Gautier write-only
2010-10-07  1:52   ` BrianG
2010-10-07 22:06     ` Yves Bailly [this message]
2010-10-08 17:11     ` Shark8
2010-10-08 15:02 ` Lucretia
2010-10-08 20:42   ` Yves Bailly
2010-10-10 19:49     ` Vadim Godunko
  -- strict thread matches above, loose matches on Subject: below --
2010-07-08  2:42 Shark8
2010-07-08 14:15 ` John B. Matthews
2010-07-09  2:18   ` anon
2010-07-12 16:51   ` Warren
2010-07-13 12:26     ` Ludovic Brenta
2010-07-13 13:13       ` Warren
2010-07-09 11:43 ` Gautier write-only
2010-07-09 15:11 ` Gene
2010-07-09 17:38   ` Shark8
2010-07-09 20:54     ` Gene
2010-07-12 17:04       ` Warren
2010-07-10  4:00     ` BrianG
2010-07-10 11:47       ` Gautier write-only
2010-07-11  2:45         ` BrianG
2010-07-11  4:10           ` Gautier write-only
2010-07-11  5:30       ` tmoran
2010-07-11 20:46         ` anon
2010-07-12 14:17           ` Shark8
2010-07-13  0:45             ` BrianG
2010-07-13 17:50               ` anon
2010-07-13 18:37                 ` Shark8
2015-01-30 14:45 ` Lucretia
2015-01-30 18:41   ` David Botton
2009-10-28 17:12 Opengl " Pablo
2009-10-28 18:01 ` Pascal Obry
2009-10-28 19:04   ` John B. Matthews
2009-10-29  6:11 ` Gautier write-only
2000-04-27  0:00 OpenGl in ADA Anderson
2000-04-27  0:00 ` Pascal Obry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox