Lazarus

Programming => Widgetset => Cocoa => Topic started by: lelebass on March 17, 2020, 05:18:00 pm

Title: Is lazopenglcontext supported in Cocoa?
Post by: lelebass on March 17, 2020, 05:18:00 pm
I am trying to test a simple OpenGL application using Lazarus 2.0.6 x86_64 but seems that there is something missing in the Cocoa implementation.

If I try to install the lazopenglcontext using fpcupdeluxe I get the following error:

/Applications/fpcupdeluxe/lazarus/components/opengl/glcocoanscontext.pas(506,45) Error: (5038) identifier idents no member "KeyEvent"

Ciao,
Daniele
Title: Re: Is lazopenglcontext supported in Cocoa?
Post by: ChrisR on March 17, 2020, 08:37:59 pm
There is a bug when compiling OpenGL for the Cocoa widgets with Lazarus 2.0.6. It may be
  https://bugs.freepascal.org/view.php?id=35797
regardless, I think if you replace the code in 2.0.6 with the code from Trunk it should work
  https://svn.freepascal.org/svn/lazarus/trunk/components/opengl/glcocoanscontext.pas
Title: Re: Is lazopenglcontext supported in Cocoa?
Post by: lelebass on March 19, 2020, 11:42:13 am
Thanks for the answer.

Looks like it is a different issue, I tried to copy the glcocoanscontext.pas from trunk but still got the same error:

glcocoanscontext.pas(506,45) Error: identifier idents no member "KeyEvent"

Should I file a bug report?

Ciao,
Daniele
Title: Re: Is lazopenglcontext supported in Cocoa?
Post by: skalogryz on March 20, 2020, 03:36:24 am
very interesting.
there's no "keyEvent" in the current trunk version of glcocoanscontext.pas

is it possible that you've some local modifications to your glcocoanscontext.pas?
so switching to trunk doesn't overwrite the file?
Title: Re: Is lazopenglcontext supported in Cocoa?
Post by: lelebass on March 29, 2020, 09:30:40 am
I was able to install latest Trunk svn 62815 using fpcupdeluxe 1.6.8i. Now the simple application with lazopenglcontext works. I suppose the problem with Lazarus 2.0.6 has been solved. Now I can start to port my application to Cocoa, I was stuck with the lazopenglcontext for a wihle. Which Lazarus version should I use: Trunk or Fixes? What do you recommend?

Thanks!

Daniele
TinyPortal © 2005-2018