Apple dropping OpenGL
Since Apple is going to drop OpenGL support we need to do one of the following things:
- Deprecate 3D View for macOS
- Translate code to Metal framework
- Look into using Metal via Vulkan in Qt http://blog.qt.io/blog/2018/05/30/vulkan-for-qt-on-macos/
- Use another cross-framework wrapper (e.g. https://github.com/bkaradzic/bgfx)
given that Metal is proprietary, I'd say option 2 is out of question for multiple reasons. Option 1 seems very attractive, since MacOS has cost us lots of maintenance effort for a relatively small target group. If there is a painless wrapper for Metal, yeah.. maybe. But I think we're wasting precious time which could be spend much better elsewhere.
I agree with @cbielow but the only option we could look into is whether Vulkan is the direction we want to go at some point. It seems like it does have cross-platform support through MoltenVK and may also have better performance (not that we need it) but it could be an option to have cross-platform support in the future as @jpfeuffer points out in point 3.
Overall I agree with @cbielow to implement (1) and keep (3) in the back of our head as an option if we / somebody / GSoC has some time (it may be a nice student / GSoC etc project). I am not so much in favor of (4) as this means going outside Qt and adding additional dependencies, right?
Yes, I think those are valid reasons and I support that procedure, too. Let's see when this is going to happen and proceed like discussed. This issue can keep track of news in that regard.
Yes, I think those are valid reasons and I support that procedure, too. Let's see when this is going to happen and proceed like discussed. This issue can keep track of news in that regard.
lets also see what Qt is doing in that area, maybe they come up with some glue layer that may require little change to our code?
I think a good first step would be to port from immediate mode OpenGL to retained mode, i.e. porting from glBegin(); glVertex3f(...); glEnd(); to equivalent code using vertex arrays and so on.
This would match the API used by Vulkan or bgfx much better, i.e. less porting effort in the second step. As an immediate benefit it would bring compatibility with OpenGL ES, as long as the common OpenGL/GLES subset is used.
BTW, is there a switch to disable the 3D view without disabling the whole GUI? Most Linux distributions build Qt on ARM with GLES backend, which disables (Desktop) OpenGL, i.e. QOpenGLFunctions_2_0.