From: "Joachim Schr�er" <joachim.schroeer@web.de>
Subject: Re: New Ada binding to OpenGL
Date: Fri, 3 Jan 2003 19:38:41 +0100
Date: 2003-01-03T19:38:41+01:00 [thread overview]
Message-ID: <av4lle$c2880$1@ID-76083.news.dfncis.de> (raw)
In-Reply-To: V54Q9.3365$FF4.203703@newsb.telia.net
Hello,
to pass null simply write something like
Gl.Glclipplane(Plane => 1, Equation => null);
But why do you want to pass null access values.
I expect some kind of error in the C code then.
I will have a look for books were Ada/C coding is documented.
I thing, the Ada95 rationale is a good reference. I will give you links
later.
J. Schr�er
"David Holm" <david@realityrift.com> schrieb im Newsbeitrag
news:V54Q9.3365$FF4.203703@newsb.telia.net...
> Joachim Schr�er wrote:
>
> > 4) The subprograms taking system.address parameters are superfluous and
> > represent a not very Adalike style. It is very staightforward to call a
> > function with access parameter mode or with a general access type.
Simply
> > declare arrays of aliased variables and pass
> > The_Array(The_Array'First)'Unchecked_Access. Take the following example
to
> > call
> > procedure glClipPlane(plane : GLENUM;
> >
> > equation: access GLDOUBLE); --
> > ./GL/gl.h:791
> >
> >
> >
> > package Opengl.Clip_Planes is
> >
> > -- Plane coefficients -----------------------------------------------
> >
> >
> > A : constant := 1; B : constant := 2; C : constant := 3; D : constant :=
> > 4;
> >
> > -- Plane-type and simple clip-plane constants -----------------------
> >
> > type Plane is array(A .. D) of aliased Gl.Gldouble;
> >
> > ...
> >
> >
> > and then in the implementation
> >
> > procedure Enable(The_Plane : in Plane) is
> >
> > begin
> >
> > Counter := Counter + 1;
> >
> > if Counter <= Clip_Plane_Indices'Last then
> >
> > Gl.Glclipplane(Plane => Clip_Plane_Indices(Counter),
> >
> > Equation => The_Plane(A)'Unchecked_Access);
> >
> > Gl.Glenable(Clip_Plane_Indices(Counter));
> >
> > ...
> >
>
> How can I pass null addresses this way? With System.Address I could use
> GLNULL : System.Address renames System.Null_Address;
>
> //David
next prev parent reply other threads:[~2003-01-03 18:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-28 6:32 New Ada binding to OpenGL David Holm
2002-12-30 20:50 ` Joachim Schr�er
2002-12-30 21:45 ` David Holm
2003-01-08 20:20 ` Brian Gaffney
2003-01-08 23:47 ` David Holm
2003-01-09 9:55 ` Bobby D. Bryant
2003-01-10 18:33 ` Brian Gaffney
2002-12-30 22:51 ` David Holm
2003-01-03 18:38 ` Joachim Schr�er [this message]
2003-01-03 23:56 ` David Holm
[not found] ` <67HR9.4217$gv.98715@newsfep1-gui.server.ntli.net>
2003-01-05 3:21 ` David Holm
2003-01-03 21:57 ` Bobby D. Bryant
2003-01-04 19:11 ` Joachim Schr�er
2002-12-30 20:54 ` Joachim Schr�er
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox