[fpc-pascal]OpenGL/GLUT run time error when I whant compile this code

Karim Forsthofer kf at linuxmail.org
Sat Apr 5 04:02:07 CEST 2003


Hello 
I played around with the OpenGL unit, and I wrote some minimal OpenGL code to get a window: 
Here is the code:

program glbasic;

uses
  gl, glut;

const
  width = 640;
  height= 480;

procedure drawthings;

begin
  glClearColor(0.0, 0.0, 0.0, 0.0);
 (*will add some more code*);
end;

begin 
  glutInit(@argc, argv);
  glutInitDisplayMode(GLUT_DOUBLE or GLUT_RGB);
  glutInitWindowSize( width, height);
  glutInitWindowPosition(0, 0);
  glutCreateWindow('glbasic');
  glutDisplayFunc(@drawthings);
  glutMainLoop();
end.

Now, when I whant to run to code, I get some Run time errors on the console: 

Runtime error 216 at 0x4052F5CA
   0x4051F5CA
Runtime error 216 at 0x0804C1CA
   0x0849C1CA
   0x0805127E
   
   etc. 
   etc. 
   etc. (about 20 lines)

1). I know not a lot of runtime errors, but after succesfully compiling, that isn`t a fpc bug, is it ? 
    What is the source of this run time error ? (mesa, fpc or my code ?)
2). I think about there isn`t enough code in the drawthings procedure to run succesfull. 

What you think ? 

Greetings 
Karim F. 

-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze



More information about the fpc-pascal mailing list