comp.lang.ada
 help / color / mirror / Atom feed
From: "ldries46" <bertus.dries@planet.nl>
Subject: acceess problem
Date: Sun, 24 Jul 2011 17:59:02 +0200
Date: 2011-07-24T17:59:02+02:00	[thread overview]
Message-ID: <4e2c416b$0$2574$703f8584@news.kpn.nl> (raw)

I am converting a C/C++ program with openGL to Ada and found the following 
problem:

C/C++ code: float pAxis1Amb[] = { AxL, 0, 0, 1};
                     glMaterialfv(vSide, GL_AMBIENT, pAxis1Amb);
where         : GLAPI void APIENTRY glMaterialfv( GLenum face, GLenum pname, 
const GLfloat *params );

In the Ada bindings the routine is declared as:
                     procedure glMaterialfv (face   : GLenum; pname  : 
GLenum; params : GLfloatPtr);
where :         type GLfloatPtr is access all GLfloat;
and     :         subtype GLfloat is Float;
I have created the following declarations : Axis1Amb   : array(0..3) of 
GLfloat := ( AxL, 0.0, 0.0, 1.0);
                                                                             
              pAxis1Amb  : GLfloatPtr := Axis1Amb'Access;
Now I get the following error message : prefix of "Access" attribute must be 
aliased
I have to follow the C/C++ code as close as possible.
What do I do wrong?

L. Dries 




             reply	other threads:[~2011-07-24 15:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-24 15:59 ldries46 [this message]
2011-07-24 17:27 ` acceess problem Simon Wright
2011-07-25  6:57   ` ldries46
2011-07-25  8:27     ` Simon Wright
2011-07-25  9:59       ` ldries46
2011-07-26 15:57       ` Gautier write-only
2011-07-26 17:43         ` Adam Beneschan
2011-07-27 12:06           ` Gautier write-only
2011-07-25  9:08     ` AdaMagica
replies disabled

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