Future of OpenGL on Macs

Hi,

I am looking at using OpenCascade for a 3D modeling app that needs to work across Windows, Mac and Linux. OpenGL works fine, but Apple have deprecated it and support is limited to OpenGL4.1. The current version is 4.6, but AFAIK openGL is no longer in active development and 4.6 was released in 2017.

Does anyone know if OpenCascade plans to support things like Vulkan or Metal? I imagine they do, as having cross-platform graphics is really essential otherwise I'll have to use HOOPS or other libraries that do support them.

Interested in any views and opinions, but particularly keep to hear some facts on this topic :-) Thanks!

- Pasta

Mark Nicholson's picture

I should add that I know that as of today all is well. I'm just concerned about Apple turning off OpenGL at some future point. BTW, one option I have is to use QT's renderer. I can use QT6's Vulkan/Metal backend to render it. Anyone with any experience of doing this? - Pasta

Dmitrii Pasukhin's picture

Hello. Yes, OCCT have plans to support Vulkan. It will be not so soon, but on long term plan we plan to support that renderer. If you would like to contribute to help us improve OCCT visualization part - we are always welcoming contributing :)

Best regards, Dmitrii.

Mark Nicholson's picture

Thanks Dimitrii. This is absolutely not my area of expertise, there's no way I can contribute! And I'll need to get OpenCascade under my fingers before I could dream of contributing :-)

I'm going to use QT to produce the UI layer, and my plan was/is to use QOpenGLWidget to show the output on screen. I'm pretty good with sticking with OpenGL until OC supports Vulkan and then switching, but an AI has suggested to me that I render the scene as a .OBJ and pass this to QT's Vulkan libraries. This would let me use Vulkan now and not depend on a new feature and mid-process upgrade. What do you think of this? Would I lose any capability in doing so?

gkv311 n's picture

You may find my thoughts about future of OpenGL on macOS here.

In general, OpenGL is quite mature graphics API that provides most of the things application would want to use. There are several possible concerns you may see:

  • The fear that OpenGL support will be suddenly dropped from future macOS versions. I don't think that this will going to happen in near future, as they already have OpenGL implementation over Metal and just need keep maintaining it. And there is a 'backup' solution with moving to alternative OpenGL implementations over Metal.
  • Bugs, specific to OpenGL implementation in current macOS and in future macOS releases. While this might hit you at some point, currently it seems that it still does work.
  • Limitations of OpenGL 4.1 that could be unveiled by newer OpenGL 4.6. While this affects OCCT 3D Viewer as well (some advanced features like Path-Tracing), the most essential functionality is still there.
  • Possible performance/functional implications of OpenGL that could be improved by another GAPI (Vulkan, Metal, etc.). While this might be useful, switching to another GAPI doesn't give an immediate boost nor new features - it is still graphic engine developers that should utilize new features.

As for using OBJ files - dealing with intermediate file formats is counter-efficient on its own, and OBJ Wavefront format is rather obsolete and limited. There are better alternatives like glTF 2.0 files format, but it would be still better using C++ API to pass through graphics data from OCCT to another graphics engine.

And before going into that - I would rather ask yourself first, what you would Qt engine bring to you that OCCT 3D Viewer doesn't (apart from supporting another GAPI, which you are apparently doesn't want to use directly)?

Mark Nicholson's picture

I'm really just concerned that OpenGL on Macs could break suddenly but I agree that's unlikely. I'll stick with OpenGL until OCCT provides Vulkan. We're using QT for UI and it has a nice OpenGL widget that should link to OCCT easily, we'll just need to update it when Vulkan support becomes available.