OpenGL on mac, forward compatibility....?
I'm writing an app that (currently) targets OpenGL 3.3 Core profile, but on a recent iMac running el Capitan, QOpenGLFunctions_3_3_Core::initializeOpenGLFunctions () returns false. The exact same code works fine on 2 different PC's running Linux. (and i don't have a w**doze machine to test)
I read something about a "forward compatibility" setting... is this what i need, and if so, how do i set it?
Thanks again for your time!
Here's a wiki article that shows how to setup the core profiles for various platforms.
Hope it helps
Thanks for the info.
That article seems to be written before 4.8.0 was released. Is this info still current? In particular,
"This is known to work under Linux but Windows and Mac OSX have some issues inside of Qt for creating Core Profile contexts. "
Making progress.... this line was missing from my main window constructor:
glformat.setVersion (3, 3);
...however that causes other problems:
On Linux, my proxy widgets are no longer appearing. This occurs even if my draw function does nothing. Without the above line, the proxy widgets appear fine.
On OSX, the program outputs a bunch of errors about shaders not compiling (#version line missing?) and then segfaults. My own shader seems to compile fine, though. Without the above line, OpenGL initialization fails, and my program has to revert to software rendering.
This mailing list thread might give you some more information to go further.