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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,43b6c5f649185450 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-06 09:58:14 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: generic type identification Date: 06 Jan 2003 12:56:13 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <_BAR9.4055$FF4.251139@newsb.telia.net> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1041876530 7921 128.183.235.92 (6 Jan 2003 18:08:50 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 6 Jan 2003 18:08:50 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:32630 Date: 2003-01-06T18:08:50+00:00 List-Id: David Holm 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