avogadrolibs icon indicating copy to clipboard operation
avogadrolibs copied to clipboard

Migrate to OpenGL Core Profile

Open ghutchis opened this issue 2 years ago • 11 comments

It would be great to move to the OpenGL core profile. At the moment @cryos has started this .. I'm adding this issue to track.

ghutchis avatar Apr 22 '22 20:04 ghutchis

It seems like GLEW is no longer a great solution.

  • [ ] libepoxy - https://github.com/anholt/libepoxy
    • [ ] FindEpoxy (from KDE) https://api.kde.org/ecm/find-module/Findepoxy.html
  • [ ] gl3w - https://github.com/skaslev/gl3w
    • This is just a Python script that generates source / header.

I'd be in favor of using gl3w in scripts/ generating our own gl3w.h and gl3w.c and be done with it.

ghutchis avatar May 27 '22 18:05 ghutchis

The OpenGL wiki also has a full list: https://www.khronos.org/opengl/wiki/OpenGL_Loading_Library

  • glbinding - https://github.com/cginternals/glbinding https://glbinding.org
  • glatter (header-only for C++) - https://github.com/imakris/glatter

ghutchis avatar May 27 '22 19:05 ghutchis

This should also solve #567

ghutchis avatar May 28 '22 21:05 ghutchis

This issue has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/avogadro-2023-roadmap/4412/1

avo-bot avatar Apr 06 '23 19:04 avo-bot

Hi @ghutchis I understand the issue now. Do you have a specific version of OpenGL in mind for our migration? If we're considering implementing geometry shaders, we might need to update the OpenGL version. Could you clarify our exact plans regarding this? Also we need to keep make sure that changing to a "modern" version doesn't result in any issues for the users???

perminder-17 avatar Mar 07 '24 23:03 perminder-17

We had discussed at least OpenGL 3.2 core, but you can see that was ~2 years ago, so we might be able to set on OpenGL 4.0 core.

I think the main thing would be to check baseline support, but probably 4.0 / 4.1 is fine.

ghutchis avatar Mar 08 '24 17:03 ghutchis

I'll mention that beyond 4.1 is problematic because Apple doesn't support more recent OpenGL on Mac. (Which is a shame, because compute shaders would be nice for some features.)

ghutchis avatar Mar 08 '24 17:03 ghutchis

I'll mention that beyond 4.1 is problematic because Apple doesn't support more recent OpenGL on Mac. (Which is a shame, because compute shaders would be nice for some features.)

Oh , I didn't know that. Thanks for quickly addressing my questions.

perminder-17 avatar Mar 08 '24 18:03 perminder-17

I'll mention that beyond 4.1 is problematic because Apple doesn't support more recent OpenGL on Mac. (Which is a shame, because compute shaders would be nice for some features.)

I know very little about graphics stacks and assume that moving to Vulkan, and VulkanVK on macOS, is not a trivial thing but rather a ridiculous amount of work?

matterhorn103 avatar Mar 08 '24 18:03 matterhorn103

I know very little about graphics stacks and assume that moving to Vulkan, and VulkanVK on macOS, is not a trivial thing but rather a ridiculous amount of work?

Yes. Vulkan is not something I'd want to pursue at this point. OpenGL 4.0 / 4.1 are well supported and likely to continue because of WebGL needs in browsers.

ghutchis avatar Mar 08 '24 18:03 ghutchis

This issue has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/feedback-requested-introducing-gsoc-24-plans-for-review-by-fellow-contributors/5429/1

avo-bot avatar May 10 '24 13:05 avo-bot