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

Visualizer: remove glfwTerminate() call from destructor (fix #4960) #4963

Closed
wants to merge 3 commits into from

Conversation

bchretien
Copy link
Contributor

@bchretien bchretien commented Apr 1, 2022

Summary of changes:

  • A fix for glfwTerminate() called in the Visualizer destructor #4960: glfwTerminate() was called everytime a Visualizer is destroyed. Now a true singleton shared context is used, and terminate is only called if there is no remaining active Visualizer. I also fixed DestroyVisualizerWindow().
  • headless_rendering.py: fix the example.
  • ViewControl::ConvertFromPinholeCameraParameters(): relax the equality check due to floating-point errors.

This change is Reviewable

@update-docs
Copy link

update-docs bot commented Apr 1, 2022

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

@@ -193,13 +193,15 @@ bool ViewControl::ConvertFromPinholeCameraParameters(
bool allow_arbitrary) {
auto intrinsic = parameters.intrinsic_;
auto extrinsic = parameters.extrinsic_;

constexpr double threshold = 1.e-6;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this be a parameter of the function?

@bchretien bchretien force-pushed the fix/4960-glfw-terminate branch 2 times, most recently from 10b7ff7 to 7753ae0 Compare April 1, 2022 07:27
@bchretien bchretien changed the title WIP: Visualizer: remove glfwTerminate() call from destructor (fix #4960) Visualizer: remove glfwTerminate() call from destructor (fix #4960) Apr 1, 2022
@bchretien bchretien changed the title Visualizer: remove glfwTerminate() call from destructor (fix #4960) WIP: Visualizer: remove glfwTerminate() call from destructor (fix #4960) Apr 1, 2022
@bchretien bchretien changed the title WIP: Visualizer: remove glfwTerminate() call from destructor (fix #4960) Visualizer: remove glfwTerminate() call from destructor (fix #4960) Apr 4, 2022
@bchretien
Copy link
Contributor Author

Ok PR ready for review! I added some more information in #4960.

@ssheorey ssheorey requested review from errissa and yxlao April 7, 2022 23:09
@ssheorey ssheorey added the status / tbd To be decided label Jan 20, 2023
@ssheorey ssheorey removed the request for review from yxlao January 20, 2023 23:03
@ssheorey
Copy link
Member

Needs testing on all platforms.

@ssheorey
Copy link
Member

Closing this and copying changes to PR #6559 to allow resolving merge conflicts.
Thanks @bchretien for submitting this!

@ssheorey ssheorey closed this Dec 29, 2023
ssheorey added a commit that referenced this pull request Dec 29, 2023
…(See PR #4963) [Author: @bchretien] (#6559)

* examples: fix headless_rendering.py
* ViewControl.cpp: relax floating-point comparison in ConvertFromPinholeCameraParameters()
* Visualizer: improve GLTF context handling (fix #4960)
---------
Authored-by: Benjamin Chrétien <2742231+bchretien@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status / tbd To be decided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants