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-04 19:25:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed1.bredband.com!bredband!news.algonet.se!algonet!news-stob.telia.net!telia.net!194.22.194.4.MISMATCH!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail From: David Holm Subject: Re: generic type identification Newsgroups: comp.lang.ada References: <_BAR9.4055$FF4.251139@newsb.telia.net> User-Agent: KNode/0.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-ID: Date: Sun, 05 Jan 2003 03:25:27 GMT NNTP-Posting-Host: 217.208.105.23 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1041737127 217.208.105.23 (Sun, 05 Jan 2003 04:25:27 CET) NNTP-Posting-Date: Sun, 05 Jan 2003 04:25:27 CET Organization: Telia Internet Xref: archiver1.google.com comp.lang.ada:32558 Date: 2003-01-05T03:25:27+00:00 List-Id: tmoran@acm.org wrote: > So you don't really need to know the "type" in the Ada sense of the > word, just in the C sense. If it's OK to call the "double" version for > any float, and the "int" version for shorts as well as ints, then one > generic for int and one for double should do the job. So how about: I wish it was this simple but as you will probably pass OpenGL alot of vertices every frame (if there are lots of stuff changing in the scene) you don't want to pass it 64bit doubles if 32bit floats are enough. Same goes for int vs short. //David