October 18, 2019, 06:28:50 PM

Author Topic: OSX Mojave/Xcode 10 - GLFW3 Quickfix  (Read 1726 times)

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 617
    • Cerberus X
OSX Mojave/Xcode 10 - GLFW3 Quickfix
« on: September 28, 2018, 05:59:47 PM »
As expected, Cerberus X in its current setup had problems building for OSX Mojave with XCode. So I spend 10 minutes and was able to modify the template and also added a line to let content render right away without the need to move the window. You can get the modified target here:


https://www.cerberus-x.com/community/threads/osx-mojave-quickfix.538/

Offline Derron

  • Hero Member
  • *****
  • Posts: 2486
Re: OSX Mojave/Xcode 10 - GLFW3 Quickfix
« Reply #1 on: September 28, 2018, 07:33:50 PM »
Might you add what changes were needed? Maybe this helps IWasAdam to get his monkey2-fork-thing to do stuff.


bye
Ron

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 617
    • Cerberus X
Re: OSX Mojave/Xcode 10 - GLFW3 Quickfix
« Reply #2 on: September 28, 2018, 07:52:44 PM »
Monkey 2 uses SDL so I don't think it will apply. But...


#1) I loaded the xcode project, set its target to 10.9 and made the suggested modifications by Xcode doing them automatically.
#2) In the window.c file of the targets glfw/src folder, I added a call to glfwPollEvents at the end of the glfwCreateWindow function.


That is all.




Offline Derron

  • Hero Member
  • *****
  • Posts: 2486
Re: OSX Mojave/Xcode 10 - GLFW3 Quickfix
« Reply #3 on: September 28, 2018, 07:57:54 PM »
That "poll events" thing might be the reason why prior a "move window" was needed ... good job as always.

bye
Ron

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 617
    • Cerberus X
Re: OSX Mojave/Xcode 10 - GLFW3 Quickfix
« Reply #4 on: September 29, 2018, 06:30:44 PM »
Just tested CX with XCode 10 and the ios12 simulator, works fine here.

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1316
Re: OSX Mojave/Xcode 10 - GLFW3 Quickfix
« Reply #5 on: September 30, 2018, 06:26:10 AM »
Thanks for the hints on where to look. Monkey2 is a different beast (internally) from monkey1. And there are two distinct opengl version being used:
 GLES (for the older versions) and OpenGL (for the latter ones) Neither of which use GLFW!

 :-[

Offline therevills

  • Hero Member
  • *****
  • Posts: 570
Re: OSX Mojave/Xcode 10 - GLFW3 Quickfix
« Reply #6 on: September 30, 2018, 07:56:35 AM »
Mark has committed an experimental fix on GitHub for M2: https://github.com/blitz-research/monkey2/commits/develop

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1316
Re: OSX Mojave/Xcode 10 - GLFW3 Quickfix
« Reply #7 on: September 30, 2018, 10:44:14 AM »
i've fixed the 'window needs moving' issue - which is a different fix from the one Mark uses.
I'm spending some time with the editor adding some functionality (cleaning up the code view and adding reverse find in sources) before moving onto looking at the OpenGL stuff itself as there are some things I would like to get resolved this time around :)

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 617
    • Cerberus X
Re: OSX Mojave/Xcode 10 - GLFW3 Quickfix
« Reply #8 on: September 30, 2018, 03:21:32 PM »
Good job Adam

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1316
Re: OSX Mojave/Xcode 10 - GLFW3 Quickfix
« Reply #9 on: October 01, 2018, 07:08:54 AM »
sorta slow progress as I'm working with Monkey2 1.02 for the editor - after that Mark internally changed the code to prevent my editor from operating. So I'm also working on attempting to update it's code so it can be compiled on a newer version.  ;D

I've been tidying up some of the code overview code so it gives better results - which is alway fun.

The reverse search is mostly working, but I want to try and implement it further to parse through the entire module code. I might take the MS approach here and build a database though. It's more a convenience for me, as only I use the editor...