Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Plugins] Add SofaGLFW GUI #2062

Merged
merged 5 commits into from
May 24, 2021
Merged

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented May 5, 2021

https://github.com/fredroy/SofaGLFW

Why?

  • Bothersome to need Qt to have a 3D rendering of a scene
  • The existing "simple" GUI SofaGLUT is not supported anymore and is based on a deprecated library (glut)

This PR brings a simple GUI based on GLFW (a spiritual heir of Glut).
It only needs SofaGUICommon, SofaBaseVisual and Sofa.GL as dependencies.
Integration of GLFW is automatic (automatic fetching and integration with cmake), and linked statically (does not need a glfw.dll to be shipped with)

This GUI is launchable with the standard runSofa (with the parameter "-g glfw"), or can be used with a (provided) stand-alone executable (which needs much less dependencies than runSofa)

Lastly, this GUI was designed to support multiple windows in the same time and multiple simulations. So when multiple simulations is possible is the future, it should be easy to modify the code to support this feature.
And multiple windows could be based on the fact having multiple Camera in the scene (feature not implemented yet)


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: new feature Implement a new feature labels May 5, 2021
@guparan guparan added the pr: highlighted in next release Highlight this contribution in the notes of the upcoming release label May 5, 2021
@fredroy fredroy added pr: status wip Development in the pull-request is still in progress pr: status to review To notify reviewers to review this pull-request and removed pr: status to review To notify reviewers to review this pull-request pr: status wip Development in the pull-request is still in progress labels May 5, 2021
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.11)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are usually compatible in 3.12 ..

@alxbilger
Copy link
Contributor

It works on Ubuntu
Capture d’écran du 2021-05-12 11-30-14

@guparan
Copy link
Contributor

guparan commented May 18, 2021

Very nice work @fredroy 👏 👏 👏

I have 2 side questions:

  • shouldn't this be under applications/projects instead of applications/plugins (I would feel more logical to have it next to runSofa basically) ?
  • is it planned to host the repository in sofa-framework organization ?

@fredroy
Copy link
Contributor Author

fredroy commented May 18, 2021

Very nice work @fredroy 👏 👏 👏

I have 2 side questions:

* shouldn't this be under applications/projects instead of applications/plugins (I would feel more logical to have it next to runSofa basically) ?

Hum, could be in the project, as there is one executable (standalone glfw launcher), but there is also one library (which can be used for runSofa as a plugin; this one is very similar to SofaQuiQt if you want)

* is it planned to host the repository in sofa-framework organization ?

Of course, my repo was more a sandbox, once this is a bit tested by people, we can move it into the sofa-framework organization.

@guparan guparan added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels May 19, 2021
@epernod epernod merged commit 8388c50 into sofa-framework:master May 24, 2021
fredroy added a commit to fredroy/sofa that referenced this pull request May 25, 2021
* add sofaglfw external project

* Update ExternalProjectConfig.cmake.in

* move dir

* update repo move

* Update ExternalProjectConfig.cmake.in

Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>
@guparan guparan added this to the v21.06 milestone Jun 28, 2021
@fredroy fredroy deleted the add_sofaglfw branch October 14, 2021 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: highlighted in next release Highlight this contribution in the notes of the upcoming release pr: new feature Implement a new feature pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants