Quote Originally Posted by JSoftware
FPC's gl.pas probably sets the mode to delphi compatibility.
That was the problem. Just added {$MODE DELPHI} and it worked (I want to keep Delphi compatibility too).

Thanks.