sciapp / gr

GR framework: a graphics library for visualisation applications
Other
329 stars 54 forks source link

[Discussion] What should I choose, OpenGL or GR3 #153

Open Roy-Kid opened 2 years ago

Roy-Kid commented 2 years ago

Hi, I have focused on this project for a long time and wrote several python codes with it. Now I want to build a molecular visualization program like ovito, which can use python to interact and manipulate. I wonder what I should choose, OpenGL from scratch or GR3. Here are my needs:

jheinen commented 2 years ago

If you start from scratch, you probably should consider to use Vulkan. The future of OpenGL is uncertain on macOS, as Apple has deprecated the OpenGL SDK (although it's stille alive). Sooner or later we will also deal with Vulkan (or MoltenVK), but we didn't have the time.

cfelder commented 2 years ago

@jheinen In this context may it’s worth to have a look at pygfx based on WGPU

Roy-Kid commented 2 years ago

Thanks for your kindly help! I will have a look vulkan and wgpu. Can I understand GR3 as a high-level encapsulation of graphics interfaces such as OpenGL? Instead of starting from scratch, can I add the functions I want on the basis of using GR3?

cfelder commented 2 years ago

GR3 is a software library for visualisation of 3D scenes. At the moment it supports several OpenGL implementations and implements also a software renderer. If you are fine w/ OpenGL or software rendering at the moment and don't want to start from scratch, imho you should go ahead w/ GR3. As @jheinen already mentioned GR3 has to adapt evolving 3D backends in the future, b/c OpenGL SDK on macOS has been deprecated. If you stick to the gr3 functions provided by the gr-framework and not rely on low-level OpenGL functions in your own code, your code should continue to work in the future w/ little to no changes.

IngoMeyer441 commented 2 years ago

You can also have a look at spinvis which visualizes electron spins using GR3 and PyQt5. Source code refactoring is currently in progress, but the repository contains a first stable version.

Roy-Kid commented 2 years ago

@cfelder Thanks for your explanation of GR3. It definitely saves me a lot of time choosing what I should use. I like the style and the idea of the GR3, and I still want to use it. @IngoMeyer441 spinvis and pyMolDyn are two good examples I need to learn before starting. What a coincidence is that the package I want to develop is named molvis to visualize the molecular dynamics model. I aim to build a "command line" ovito, which means we can use the python script(molpy) to select, manipulate or calculate physical parameters on the fly. Does your institution have any position to recruit a Ph.D. to develop GR3 and affiliated sciapp? I want to dedicate myself to the field and develop agile software for researchers.