OpenGL broken on OSX?

I can no longer get OpenGL to display anything on OSX. I downloaded the OpenGL tutorial and Juce 7.0.5 on a clean OSX 13.1 machine and everything builds but no teapot. The same exercise works fine in Windows. I know Apple is trying to deprecate OpenGL, but I don’t think this is the problem. My old OpenGL plugins still display fine and when debugging through the code all the OpenGL calls seem to succeed. I have tried an Intel Mac and an M1 Mac with the same results (OS versions 13.1 & 13.3.1). My only hint so far is the following error message, display when starting the app:

OpenGLAppTutorial[25558:510557] [Window] Warning: Window JUCEWindow_b37c75d039e2e3df 0x12160b880 ordered front from a non-active application and may order beneath the active application’s windows.

I have also tried going back to Juce 6 and forward to the latest commit on the develop branch. I have tried building with Xcode 12.5.1. I get the same result - no teapot.

I haven’t found an answer yet, but I do have more data. While the OpenGL Tutorial still won’t work for me, nor will my will my own OpenGL based plugins, the DemoRunner will display its 3D OpenGL demos. I have spent hours trying to find the difference between the DemoRunner and the OpenGL Tutorial, but no luck yet. The working DemoRunner gives the same error shown above, so that’s not it.

I am currently unable to build and release new versions of several of my plugins, so this is not just an academic exercise. I need some help.

Given that old versions of your plugins and the JUCE demos display correctly, it sounds like the breakage might be specific to your code.

Have you been using source control to manage your projects? If so, are you able to use git bisect or equivalent to find the point at which the OpenGL views stopped displaying as expected?

1 Like

I certainly would have assumed that I just broke something in my code and spent more time digging that direction except for two things. First, I am fairly certain that I haven’t touched anything related to OpenGL or how the windows get built since my last working version. But more importantly, the OpenGL tutorial app downloaded from the JUCE website (JUCE: Tutorial: Build an OpenGL application) fails in the same way as my plugins. Fresh JUCE 7.0.5 with a clean download of the tutorial builds and runs but does not display the teapot. Currently using MacOS 13.4 and XCode 14.3 on an M1 MacBook Pro.

I got out my old build machine, which is MacOS 10.15 and XCode 11.3.1 and tried the same test: download JUCE 7.0.5 and the OpenGL tutorial. This one works! This doesn’t help me much since this machine (a 2013 MacBook Pro) is too old to be updated and can’t build the dual binaries I now need, but this definitely makes it look like something in an OS upgrade caused this problem.

Again, the DemoRunner works. The OpenGL Tutorial app doesn’t, both on my up to date machine. Everything works in MacOS 10.15 but not in 13.4. Unfortunately, I don’t know at what version it stopped working. I tried a build in MacOS 12, which also displayed nothing, but that was using a GitHub runner to do the build, which is not my usual build process, so I have less faith in that result.

Oh, and I was not familiar with git bisect. Thanks for that useful tip.