Attempting to get 1.91 built on Mac
Moderators: winston, another_commander
Re: Attempting to get 1.91 built on Mac
I haven't submitted any pull requests back to the main repo yet. I have libpng done (incorporated directly into the repo, with all source files in deps/Cocoa-deps/libpng) in my local repo, and I'll do Sparkle next. Then clean things up, and submit a pull request to the 1.90-mac-build-bugfix branch. The libpng changes seem to be working fine from what I see with minimal testing.
There's really nothing to download or try yet, this is all just organizational and build-related at this point, and resurrecting the mac build, starting with 1.90.
I haven't yet made the oolite.org -> oolite.space transition yet either.
Once there is something different to run and try out, I'll put something up somewhere and post a message.
There's really nothing to download or try yet, this is all just organizational and build-related at this point, and resurrecting the mac build, starting with 1.90.
I haven't yet made the oolite.org -> oolite.space transition yet either.
Once there is something different to run and try out, I'll put something up somewhere and post a message.
Re: Attempting to get 1.91 built on Mac
OK I've submitted a pull request for the v1.90 mac build bugfixes and changes we discussed.
No update of the OXP download site yet, this is just the build. Assuming the PR goes well and functions properly, then I'll make that change next.
No update of the OXP download site yet, this is just the build. Assuming the PR goes well and functions properly, then I'll make that change next.
- hiran
- Theorethicist
- Posts: 2410
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Attempting to get 1.91 built on Mac
I'm not a Mac user but curious:
Do you think it is possible to make Oolite compile on current hardware?
Do you think it is possible to make Oolite compile on current hardware?
Sunshine - Moonlight - Good Times - Oolite
Re: Attempting to get 1.91 built on Mac
Which combination of OOlite version, macos version, and hardware version are you interested in?
I would like to see this matrix filled out. For now I'm just trying to understand what builds and runs on systems available to me, and so started with getting 1.90 to build and run on 10.14.6, and pursue some bug fixes of longstanding annoying issues (sound cutting out!)
For latest oolite versions with the new renderer that require OpenGL 3.3, this seems to be a potential blocker. But we'll see. One version at a time for now .
I would like to see this matrix filled out. For now I'm just trying to understand what builds and runs on systems available to me, and so started with getting 1.90 to build and run on 10.14.6, and pursue some bug fixes of longstanding annoying issues (sound cutting out!)
For latest oolite versions with the new renderer that require OpenGL 3.3, this seems to be a potential blocker. But we'll see. One version at a time for now .
Re: Attempting to get 1.91 built on Mac
Another bit of good news -- my build-fixed 1.90 also runs on my late 2009 mac mini running mac os 10.8.5, so it does indeed work on older systems.
And when I mean work, I mean I loaded up an old save file, launched, and flew around for a few minutes.
And when I mean work, I mean I loaded up an old save file, launched, and flew around for a few minutes.
Re: Attempting to get 1.91 built on Mac
I'm trying to reproduce this, but something's apparently missing. I tried the latest changes listed in this thread to MyOpenGLView.m, but I'm getting an early exception because glGetString(GL_EXTENSIONS) is returning a null string. It would be great to have a branch on a repo somewhere posted so that others can reproduce and continue experimenting....
Re: Attempting to get 1.91 built on Mac
Making a bit of progress (just to get past initial startup) with some internet searches, but for the record, is there a succinct statement of what the exact requirements are from OpenGL in Oolite master branch, in order for Oolite to work (extensions, formats, shading language, etc.)?
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Attempting to get 1.91 built on Mac
The requirement is glsl shading language, extensions as listed in OOOpenGLExtensionManager.m and OpenGL version capable of utilizing multiple render targets (MRT).
I was going through the requirements and I just realized something that could be very helpful for all: I was under the very strong impression that MRTs were available from OpenGL 3.3 onwards (I even put a comment about it in the code), but it appears that this is wrong. They are present from OpenGL version 2.0 and up. Which means, that hopefully, maybe the 3.3 requirement is an over-estimate and maybe, just maybe, mac with OGL 2.1 can actually hit the renderer requirements of the current trunk.
Before attempting to go into a quest for getting OGL 4.1 to play nice, try building trunk as-is, with OpenGL 2.1 which is the default for Apple's implementation. Apologies in advance (and especially to phkb) if I sent you guys out on a wild goose chase with 3.3, but right now I can't recall why I set minimum requirement to 3.3, if not for MRTs.
Remember to update OOOpenGLExtensionManager.m for your tests with the updated requirement by setting at the top of the file the enum as:
I was going through the requirements and I just realized something that could be very helpful for all: I was under the very strong impression that MRTs were available from OpenGL 3.3 onwards (I even put a comment about it in the code), but it appears that this is wrong. They are present from OpenGL version 2.0 and up. Which means, that hopefully, maybe the 3.3 requirement is an over-estimate and maybe, just maybe, mac with OGL 2.1 can actually hit the renderer requirements of the current trunk.
Before attempting to go into a quest for getting OGL 4.1 to play nice, try building trunk as-is, with OpenGL 2.1 which is the default for Apple's implementation. Apologies in advance (and especially to phkb) if I sent you guys out on a wild goose chase with 3.3, but right now I can't recall why I set minimum requirement to 3.3, if not for MRTs.
Remember to update OOOpenGLExtensionManager.m for your tests with the updated requirement by setting at the top of the file the enum as:
Code: Select all
enum
{
kMinMajorVersion = 2,
kMinMinorVersion = 1
};
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Attempting to get 1.91 built on Mac
After some further investigation, it seems that we indeed need at least OGL 3.0 because of Frame Buffer Objects (see https://en.wikipedia.org/wiki/OpenGL ). At this point, might as well leave the 3.3 requirement we have now untouched.
I'll update the comment in the code why OGL 3 is needed.
I'll update the comment in the code why OGL 3 is needed.
Re: Attempting to get 1.91 built on Mac
What version of glsl shading language?another_commander wrote: ↑Sat Sep 21, 2024 1:42 pmThe requirement is glsl shading language, extensions as listed in OOOpenGLExtensionManager.m and OpenGL version capable of utilizing multiple render targets (MRT).
I was going through the requirements and I just realized something that could be very helpful for all: I was under the very strong impression that MRTs were available from OpenGL 3.3 onwards (I even put a comment about it in the code), but it appears that this is wrong. They are present from OpenGL version 2.0 and up. Which means, that hopefully, maybe the 3.3 requirement is an over-estimate and maybe, just maybe, mac with OGL 2.1 can actually hit the renderer requirements of the current trunk.
Before attempting to go into a quest for getting OGL 4.1 to play nice, try building trunk as-is, with OpenGL 2.1 which is the default for Apple's implementation. Apologies in advance (and especially to phkb) if I sent you guys out on a wild goose chase with 3.3, but right now I can't recall why I set minimum requirement to 3.3, if not for MRTs.
Remember to update OOOpenGLExtensionManager.m for your tests with the updated requirement by setting at the top of the file the enum as:Code: Select all
enum { kMinMajorVersion = 2, kMinMinorVersion = 1 };
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Attempting to get 1.91 built on Mac
Just noticed that the shaders oolite-texture.*, oolite-blur.* and oolite-final.* get a header from within our code in
So, although most of the shaders are using the default version (1.10), there are also those which need the higher version. So I guess those are the ones that define the requirement, hence glsl version has to be 3.30.
- (void) initTargetFramebufferWithViewSize:(NSSize)viewSize
(Universe.m). This header appends a #version 330
directive at the top of each one. So, although most of the shaders are using the default version (1.10), there are also those which need the higher version. So I guess those are the ones that define the requirement, hence glsl version has to be 3.30.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Attempting to get 1.91 built on Mac
Apologies for allowing this to fall into a hole. Not being a native Apple developer, everything I try involves some extended period of time researching for a possible fix, then more time trying to wrangle said fix into the code, only to find the fix doesn’t work and starting again. Very time consuming and discouraging.
I’m away from my VM environment for a few days, but I should have some time on Monday to, at the very least, put what I’ve done into a branch so others can have a look.
I’m away from my VM environment for a few days, but I should have some time on Monday to, at the very least, put what I’ve done into a branch so others can have a look.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Attempting to get 1.91 built on Mac
OK, I've created a branch on 1.91 (called "failed_mac_build") that has all the code I'd currently changed to get to the previous point (ie. compiles OK, shows splash but fails to get any further). Note that I had disabled the Sparkle code in this branch. I did this work on MacOS Sierra in Xcode 9.2
And in case there's any confusion, this build should not be merged. It's purely for reference purposes.
Re: Attempting to get 1.91 built on Mac
Thanks, but after discussion it looks like Mac just isn't going to support compatibility mode OpenGL past 2.1