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

[viewer] add FPS counter using imgui #355

Merged
merged 4 commits into from
Nov 18, 2019
Merged

[viewer] add FPS counter using imgui #355

merged 4 commits into from
Nov 18, 2019

Conversation

msbaines
Copy link
Contributor

Motivation and Context

Would be cool to be able to use imgui for HeadsUpDisplay

Screen Shot 2019-11-16 at 9 35 21 PM

How Has This Been Tested

Ran viewer and verified that FPS counter is displayed correctly.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Nov 17, 2019
Copy link
Collaborator

@mosra mosra left a comment

Choose a reason for hiding this comment

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

Plain and simple. Thank you! :)

src/cmake/dependencies.cmake Outdated Show resolved Hide resolved
Copy link
Contributor

@bigbike bigbike left a comment

Choose a reason for hiding this comment

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

I was thinking "iamgui" might be heavy in terms of development but clearly I am wrong! I sincerely appreciate your effort to bring it to us during the weekend.

I remember when I initialized #343, I directly applied a couple of Magnum libraries (fontManager, fonts, Renderer2D) to the "viewer", the reviewers required me to extract the "text drawing" in a separate class to keep the viewer clean and code re-usable. I hope "iamgui" would serve this purpose and address their concerns even though there is certain "iamgui" related logic exposed in the code (e.g., setBlendFunction, ImGui::Begin, SetWindowFontScale(...)). Hope they can tolerate it.

Thank you very much, @msbaines!

About implementation details:
I am not sure if it is possible to move the "text display" to the TOP-LEFT or TOP-RIGHT? That would make it perfect.

Also please make sure it can be compiled in --headless mode as well.

src/utils/viewer/viewer.cpp Outdated Show resolved Hide resolved
src/utils/viewer/viewer.cpp Outdated Show resolved Hide resolved
@bigbike
Copy link
Contributor

bigbike commented Nov 18, 2019

Also, would you consider adding a boolean switch to turn on/off the info display?
Check the displayPerformanceInfo in #343.

@bigbike bigbike mentioned this pull request Nov 18, 2019
11 tasks
@msbaines msbaines merged commit 07f5f22 into master Nov 18, 2019
@msbaines msbaines deleted the imgui branch November 18, 2019 19:01
eundersander pushed a commit to eundersander/habitat-sim that referenced this pull request Aug 6, 2020
Ram81 pushed a commit to Ram81/habitat-web-sim that referenced this pull request Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants