Forum > OpenGL
GLUT in Lazarus
Sergey KN:
learn Glut, this the example here:
1. put the file in system32 glut32.dll
2. added to the uses GLUT, GL, GLU
3. added a procedure to initialize the GLUT:
--- Code: ---procedure glutInitPascal(ParseCmdLine: Boolean);
var
Cmd: array of PChar;
CmdCount, I: Integer;
begin
if ParseCmdLine then
CmdCount := ParamCount + 1
else
CmdCount := 1;
SetLength(Cmd, CmdCount);
for I := 0 to CmdCount - 1 do
Cmd[I] := PChar(ParamStr(I));
glutInit(@CmdCount, @Cmd);
end;
--- End code ---
The result: could not load Glut from glut32.dll
what am I doing wrong?
User137:
You have dynamic array. Try this:
--- Code: ---glutInit(@CmdCount, @Cmd[0]);
--- End code ---
Sergey KN:
No, the error does not change
Laksen:
Make sure you are using a correct dll. You can't use a 32bit dll in a 64bit program, and vice versa
Sergey KN:
I downloaded 64 bit dll. the error does not change
I often see references to the file glut.pas
where to put it and where to get? perhaps this is the case
Navigation
[0] Message Index
[#] Next page