comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.A.Leake@nasa.gov>
Subject: Re: generic type identification
Date: 06 Jan 2003 12:56:13 -0500
Date: 2003-01-06T18:08:50+00:00	[thread overview]
Message-ID: <u1y3q88n6.fsf@nasa.gov> (raw)
In-Reply-To: _BAR9.4055$FF4.251139@newsb.telia.net

David Holm <david@realityrift.com> writes:

> It is a thick binding to OpenGL. In case you have never seen the OpenGL API 
> it has one procedure for every type you can access it with.

Bindings are supposed to be hard to write and easy to use; your effort
writing the binding saves zillions of people effort in using them :).
We appreciate it!

> 
> For instance, glVertex has 24 different declarations depending on
> whether you use (C) floats, doubles, integers, shorts etc and
> whether your send it an array of 2, 3 or 4 coordinates with any of
> these types. 

Overloaded procedures is the right way to go here; one Ada procedure
for each C procedure.

> I was hoping to be able to create one interface for this in Ada
> (possibly by using generic instead of overloading every procedure).

You would need a real binding generator to do this automatically.

> 
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=8903101703.AA04518%40ti.com

too much overhead. 

-- 
-- Stephe



      parent reply	other threads:[~2003-01-06 17:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-04  1:50 generic type identification David Holm
2003-01-04  2:04 ` chris.danx
2003-01-04  5:39 ` tmoran
2003-01-04 12:39   ` David Holm
2003-01-04 16:13     ` James S. Rogers
2003-01-05  3:28       ` David Holm
2003-01-05 10:03         ` Gautier
2003-01-04 19:27     ` tmoran
2003-01-05  3:25       ` David Holm
2003-01-05  5:42         ` tmoran
2003-01-06 17:56     ` Stephen Leake [this message]
replies disabled

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