comp.lang.ada
 help / color / mirror / Atom feed
* help with pointerproblem.
@ 1998-09-10  0:00 Roger Carlsson
  1998-09-10  0:00 ` Steve Doiel
  1998-09-11  0:00 ` Mats Weber
  0 siblings, 2 replies; 7+ messages in thread
From: Roger Carlsson @ 1998-09-10  0:00 UTC (permalink / raw)


Hello.

I'm writing a program in ada95 with opengl on W95.

I have the following definitions in GL.ads:

type GLubyte     is new C.unsigned_char;
type GLpointer   is access all GLubyte;  -- our substitute for "void *"

and

procedure (.......; x : GLpointer);


My own types:

type VertexArray is array (NATURAL range <>) of aliased GLfloat;
type VertexArrayPtr is access VertexArray;


and in the program:
VPtr : VertexArrayPtr;
.....

VPtr := new VertexArray(0 .. n);


procedure(....., GLpointer(VPtr));

I want to give the procedure my VertexArray as argument x.
My question is: How do i convert my VertexarrayPtr to a GLpointer?
I have tried different solutions but the compiler complains like:
Target designated type not compatible with type VertexArray.

If i can not. Can i rewrite my own types so it works?
The VertexArray must hold GLfloat's.


Thank You.
Roger.





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

end of thread, other threads:[~1998-09-17  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-10  0:00 help with pointerproblem Roger Carlsson
1998-09-10  0:00 ` Steve Doiel
1998-09-11  0:00   ` Wayne Magor
1998-09-11  0:00     ` Mats Weber
1998-09-12  0:00     ` dewarr
1998-09-17  0:00       ` Matthew Heaney
1998-09-11  0:00 ` Mats Weber

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