1.11.6 not working on OSX

Problems building or running the engine, queries about how to use features etc.
Post Reply
glennr
Greenskin
Posts: 126
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 9

1.11.6 not working on OSX

Post by glennr »

Ogre Version: :1.11.6 stable from git:
Operating System: :OSX 10.14.4:
Render System: :OpenGL and GL3+:

I have an app with Windows and OSX versions that uses Ogre embedded in Qt, up to version 1.10 it's worked properly on both platforms. I've just ported it to use RTSS and it works on Windows as expected with D3D9, OpenGL, D3D11 and GL3+.
On OSX the graphics loop runs but I don't see anything on the screen. I also notice that the SampleBrowser app doesn't run on OSX and appears to have a similar issue where the graphics loop runs but the window doesn't show. I've reported this here: https://github.com/OGRECave/ogre/issues/1170 . (The build system doesn't appear to deploy libfreetype.x.y.dylib to the right place so I copied that manually to get it to run at all.)

I'm wondering if anyone else is successfully running 1.11 on OSX 10.14? If so, any tips?
User avatar
EricB
Bronze Sponsor
Bronze Sponsor
Posts: 360
Joined: Fri Apr 09, 2010 5:28 am
Location: Florida
x 213
Contact:

Re: 1.11.6 not working on OSX

Post by EricB »

1.11.5 is working fine for me and a few hundred users on all versions of OSX after 10.10. (I didn't know there was a 1.11.6 branch.)

OpenGL2, GWFL for windowing. RTSS currently disabled, but I just recently re-enabled it and will be testing it on the platform in a couple of days.
Image
glennr
Greenskin
Posts: 126
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 9

Re: 1.11.6 not working on OSX

Post by glennr »

Thanks for that. With SDL installed the SampleBrowser app works.

However according to paroj:
ogre falls back to creating the window internally if SDL is not available. Apparently this path is broken as well.
User avatar
EricB
Bronze Sponsor
Bronze Sponsor
Posts: 360
Joined: Fri Apr 09, 2010 5:28 am
Location: Florida
x 213
Contact:

Re: 1.11.6 not working on OSX

Post by EricB »

Ogre does work without using SDL or GLFW (in my case) for window management, however you will have to do quite a bit of Object-C. You'll also run into about a thousand little stupid issues that comes with Mac programming. So it's better to use SDL or GLFW, which you already have! Good luck!
Image
glennr
Greenskin
Posts: 126
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 9

Re: 1.11.6 not working on OSX

Post by glennr »

There seem to be conflicting answers here.

Can I expect the SampleBrowser to work on OSX straight out of the box if I don't have SDL installed?
glennr
Greenskin
Posts: 126
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 9

Re: 1.11.6 not working on OSX

Post by glennr »

Some further information on my app's behaviour.

If I have an external monitor attached and also open the laptop so I have an the 2 displays side by side then on starting my app, it appears on the external monitor and the 3D graphics are not visible but if I drag the my app's window to the laptop monitor then as soon as the mouse pointer changes to the other screen the 3D graphics appear and remain visible thereafter, wherever the window is positioned. When running the app with only one display, either external or laptop, the ogre graphics never appear.

This is with 1.11, it works as expected with 1.10.

This OSX machine is a mid 2012 macbook pro. It has 2 GPUs - NVIDIA GeForce GT 650M and Intel HD Graphics 4000.
User avatar
EricB
Bronze Sponsor
Bronze Sponsor
Posts: 360
Joined: Fri Apr 09, 2010 5:28 am
Location: Florida
x 213
Contact:

Re: 1.11.6 not working on OSX

Post by EricB »

glennr wrote: Tue Apr 30, 2019 10:22 pm There seem to be conflicting answers here.

Can I expect the SampleBrowser to work on OSX straight out of the box if I don't have SDL installed?
SampleBrowsers? No, you have to use whatever code/libraries Paroj uses for the samples.

I was speaking in general.
Image
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: 1.11.6 not working on OSX

Post by paroj »

glennr wrote: Tue Apr 30, 2019 10:30 pm Some further information on my app's behaviour.

If I have an external monitor attached and also open the laptop so I have an the 2 displays side by side then on starting my app, it appears on the external monitor and the 3D graphics are not visible but if I drag the my app's window to the laptop monitor then as soon as the mouse pointer changes to the other screen the 3D graphics appear and remain visible thereafter, wherever the window is positioned. When running the app with only one display, either external or laptop, the ogre graphics never appear.

This is with 1.11, it works as expected with 1.10.

This OSX machine is a mid 2012 macbook pro. It has 2 GPUs - NVIDIA GeForce GT 650M and Intel HD Graphics 4000.
This sounds like we are not calling some method any more that is implicitly called when you move the window across screens. Actually a lot of stuff happens behind the scenes if the screens are handled by different GPUs. See https://en.wikipedia.org/wiki/Nvidia_Optimus

A notable change between 1.10 and 1.11 is this:
https://github.com/OGRECave/ogre/blob/m ... t-ogremain

you might want to compare the GLSupport component between 1.10 and 1.11 and look for suspicious changes. Also the functionality of the ApplicationContext class was reduced when SDL2 is not available, as we do not want to re-implement SDL2 in ogre.
glennr
Greenskin
Posts: 126
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 9

Re: 1.11.6 not working on OSX

Post by glennr »

The 1.10 OSX there is some cocoa window event handling code in ogre-1-10\RenderSystems\GLSupport\src\OSX\OgreOSXCocoaWindowDelegate.mm which gets instantiated in ogre-1-10\RenderSystems\GLSupport\src\OSX\OgreOSXCocoaWindow.mm .

In 1.11, the platform specific stuff was moved to OgreBites and I can see that there is window event handling code for Windows and Linux/X11 in ogre-1-11\Components\Bites\src\OgreWindowEventUtilities.cpp but there is no corresponding code for OSX.

OgreOSXCocoaWindowDelegate.mm appears to have completely disappeared from 1.11. Should it have been moved to OgreBites too?
glennr
Greenskin
Posts: 126
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 9

Re: 1.11.6 not working on OSX

Post by glennr »

Any thoughts about the missing OgreOSXCocoa*.mm files?
glennr
Greenskin
Posts: 126
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 9

Re: 1.11.6 not working on OSX

Post by glennr »

Not working in 1.12.1 either.

Can someone help me out with the missing OSX code? Was it mistakenly or intentionally removed?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: 1.11.6 not working on OSX

Post by paroj »

Try adding the Code Back in 1.12 or 1.11 and verify whether it solves your Problem.
The Code was probably removed in assumption of sdl2 being used.
glennr
Greenskin
Posts: 126
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 9

Re: 1.11.6 not working on OSX

Post by glennr »

paroj wrote: Thu Jun 20, 2019 12:06 pm Try adding the Code Back in 1.12 or 1.11 and verify whether it solves your Problem.
The Code was probably removed in assumption of sdl2 being used.
Adding the code back didn't make any difference.

However I have now tried it using 1.10.12 and it has the same issue. That points to the problem being in the macOS SDK or Xcode.

When building on OSX 10.14.5 I'm using Xcode 10.2.1, but on 10.11.6, where the built program doesn't have this issue, I'm building using Xcode 8.2.1. So some version of Xcode between those two broke it. I suspect is was 10.
Post Reply