From: "ldries46" <bertus.dries@planet.nl>
Subject: ADA and Open GL
Date: Tue, 9 Aug 2011 16:31:47 +0200
Date: 2011-08-09T16:31:47+02:00 [thread overview]
Message-ID: <4e4144df$0$2573$703f8584@news.kpn.nl> (raw)
I do have a program where I have to create an OpenGL window in a selected
number of cases.
The routine in which that happens is:
procedure InitGlutWindow( argc : integer; argv : string; Xpos : integer;
Ypos : integer; Width : integer; Height : integer; WindowName : string ) is
argca : aliased integer := argc;
winna : aliased string := WindowName;
pargv : Interfaces.C.Strings.chars_ptr;
pwin : GLubytePtr := Interfaces.C.Strings.New_String(WindowName);
begin
pargv := Interfaces.C.Strings.New_String(argv);
glutInit( argca'Access, pargv );
glutInitDisplayMode (GLUT_DOUBLE);
glLoadIdentity;
gluLookAt(eyex, eyey, eyez, refx, refy, refz, dirx, diry, dirz);
glutInitWindowSize( Width, Height );
glutInitWindowPosition( Xpos, Ypos );
glutCreateWindow( pwin ); -- Create the Window PROBLEM
glMatrixMode(GL_PROJECTION);
glLoadIdentity;
glOrtho( -0.5*vOrtho, vOrtho, -0.5*vOrtho, 0.5*vOrtho, -0.5*vOrtho,
0.5*vOrtho );
glMatrixMode(GL_MODELVIEW);
end InitGlutWindow;
When compiling I get the error message:
cannot use function "glutCreateWindow" in a procedure call
when I create a function in stead of a procedure I get the same error
message
What can I do to make this work.
L. Dries
next reply other threads:[~2011-08-09 14:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-09 14:31 ldries46 [this message]
2011-08-09 14:48 ` ADA and Open GL Georg Bauhaus
2011-08-09 14:51 ` Simon Wright
2011-08-10 8:58 ` ldries46
2011-08-10 11:09 ` Simon Wright
2011-08-10 13:23 ` ldries46
2011-08-10 15:35 ` Simon Wright
-- strict thread matches above, loose matches on Subject: below --
2011-08-10 14:24 ldries46
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox