OpenChemistry / avogadrolibs

Avogadro libraries provide 3D rendering, visualization, analysis and data processing useful in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas.
https://two.avogadro.cc/
BSD 3-Clause "New" or "Revised" License
434 stars 165 forks source link

Migrate to OpenGL Core Profile #864

Open ghutchis opened 2 years ago

ghutchis commented 2 years ago

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 commented 2 years ago

It seems like GLEW is no longer a great solution.

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

ghutchis commented 2 years ago

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

ghutchis commented 2 years ago

This should also solve #567

avo-bot commented 1 year ago

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

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

perminder-17 commented 6 months ago

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???

ghutchis commented 6 months ago

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 commented 6 months ago

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.)

perminder-17 commented 6 months ago

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.

matterhorn103 commented 6 months ago

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?

ghutchis commented 6 months ago

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.

avo-bot commented 4 months ago

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