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