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,FREEMAIL_FROM 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-05 02:03:51 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: gautier_niouzes@hotmail.com (Gautier) Newsgroups: comp.lang.ada Subject: Re: generic type identification Date: 5 Jan 2003 02:03:51 -0800 Organization: http://groups.google.com/ Message-ID: <17cd177c.0301050203.2c7b6e14@posting.google.com> References: <_BAR9.4055$FF4.251139@newsb.telia.net> NNTP-Posting-Host: 80.218.94.199 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1041761031 11782 127.0.0.1 (5 Jan 2003 10:03:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 5 Jan 2003 10:03:51 GMT Xref: archiver1.google.com comp.lang.ada:32565 Date: 2003-01-05T10:03:51+00:00 List-Id: David Holm : > In this case I'd rather create a couple of overloaded procedures as the idea > of the thick binding is to make it easier to access OpenGL from Ada. > This method would just make it harder since it would require one extra call > for each time you pass values to OpenGL. It's the simplest variant IMHO too... Excerpt from my home-made bindings to OpenGL 1.1: package GL is .... -- Specify vertices procedure Vertex (x,y: GL.double); procedure Vertex_f (x,y: GL.float); procedure Vertex (x,y: GL.int); procedure Vertex_s (x,y: GL.short); procedure Vertex (x,y,z: GL.double); procedure Vertex_f (x,y,z: GL.float); .... private .... -- Wrapper for vertex2d procedure vertex2d (x,y: GL.double); procedure vertex (x,y: GL.double) renames vertex2d; -- Wrapper for vertex2f procedure vertex2f (x,y: GL.float); procedure vertex_f (x,y: GL.float) renames vertex2f; .... pragma Import (Stdcall, Vertex3d, "glVertex3d"); pragma Import (Stdcall, Vertex3f, "glVertex3f"); pragma Import (Stdcall, Vertex3i, "glVertex3i"); .... end GL; Write me for an applet that produces the "renames" part ________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!