comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: what is current status of OpenGL and Ada?
Date: Tue, 07 Feb 2012 06:18:30 +0200
Date: 2012-02-07T06:18:30+02:00	[thread overview]
Message-ID: <9pbn0lFhotU1@mid.individual.net> (raw)
In-Reply-To: <jgpv1u$1a5$1@dont-email.me>

On 12-02-07 03:33 , BrianG wrote:

> You could also try GLOBE; it's not OpenGL, but a higher-level library.
> However, it contains an OpenGL binding. I haven't looked at it recently,
> except to see that it gets updates, but it should be more recent than
> 2003. It's also the only Ada binding I've seen that doesn't blindly
> follow the C nature of the typical OpenGL function set (every function
> has different named versions for the different parameter sets - which
> even the OpenGL spec 'Red Book' recognizes as not needed for languages
> that allow overloading "like C++ and Ada").
>
> (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}.

"No way"? Is there some reason why you cannot qualify the literals, as 
in Float'(3.14) versus Long_Float'(3.14)?

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

If there are many parameters that can (all together) be either Float or 
Long_Float, and many calls with all-literal parameters, it is of course 
briefer to write a few extra letters in the function name, than to write 
all the type qualifiers around the literals. (In principle it is not 
necessary to qualify all the literal parameters; it is enough to qualify 
only  as many as are needed to resolve the overloading, but that looks 
unsymmetric and unsystematic.)

I know next to nothing about OpenGL or GLOBE. Are all-literal calls so 
sommon that writing them in a qualified form is very bad?

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .



  parent reply	other threads:[~2012-02-07  4:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-05  6:52 what is current status of OpenGL and Ada? Nasser M. Abbasi
2012-02-05  7:03 ` Nasser M. Abbasi
2012-02-05 12:00 ` Yannick Duchêne (Hibou57)
2012-02-05 12:34   ` Nasser M. Abbasi
2012-02-05 16:21     ` Erich
2012-02-06  7:48       ` Gautier write-only
2012-02-07  1:33     ` BrianG
2012-02-07  4:14       ` Nasser M. Abbasi
2012-02-07 11:44         ` Gautier write-only
2012-02-07  4:18       ` Niklas Holsti [this message]
2012-02-07  4:23       ` Yannick Duchêne (Hibou57)
2012-02-07 23:00         ` BrianG
2012-02-06  2:24 ` Yannick Duchêne (Hibou57)
2014-09-12 23:34 ` fastrgv
2014-09-13  7:49   ` Simon Wright
2014-09-14 12:12 ` darkestkhan
replies disabled

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