comp.lang.ada
 help / color / mirror / Atom feed
* acceess problem
@ 2011-07-24 15:59 ldries46
  2011-07-24 17:27 ` Simon Wright
  0 siblings, 1 reply; 9+ messages in thread
From: ldries46 @ 2011-07-24 15:59 UTC (permalink / 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 




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-07-27 12:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-24 15:59 acceess problem ldries46
2011-07-24 17:27 ` 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

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