Skip to content

Commit

Permalink
igl | shell | Don't scale ImGui 2x
Browse files Browse the repository at this point in the history
Summary: With the new render session initialization code, 2x scaling is no longer required.

Reviewed By: rokuz

Differential Revision: D62899945

fbshipit-source-id: 81cc6275ee61cfbaa589bf372a5958123af59644
  • Loading branch information
corporateshark authored and facebook-github-bot committed Sep 18, 2024
1 parent ec5a825 commit ce53324
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion shell/renderSessions/BindGroupSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ void BindGroupSession::update(igl::SurfaceTextures surfaceTextures) noexcept {
commands->bindIndexBuffer(*ib0_, IndexFormat::UInt16);
commands->drawIndexed(static_cast<size_t>(3u * 6u * 2u));

imguiSession_->beginFrame(framebufferDesc_, getPlatform().getDisplayContext().pixelsPerPoint * 2);
imguiSession_->beginFrame(framebufferDesc_, getPlatform().getDisplayContext().pixelsPerPoint);
imguiSession_->drawFPS(fps_.getAverageFPS());
imguiSession_->endFrame(device, *commands);

Expand Down
3 changes: 1 addition & 2 deletions shell/renderSessions/TinyMeshBindGroupSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,7 @@ void TinyMeshBindGroupSession::update(igl::SurfaceTextures surfaceTextures) noex
}
commands->popDebugGroupLabel();
{
imguiSession_->beginFrame(framebufferDesc_,
getPlatform().getDisplayContext().pixelsPerPoint * 2);
imguiSession_->beginFrame(framebufferDesc_, getPlatform().getDisplayContext().pixelsPerPoint);
ImGui::Begin("Texture Viewer", nullptr, ImGuiWindowFlags_AlwaysAutoResize);
ImGui::Image(ImTextureID(texture1_.get()), ImVec2(512, 512));
ImGui::End();
Expand Down
3 changes: 1 addition & 2 deletions shell/renderSessions/TinyMeshSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,7 @@ void TinyMeshSession::update(igl::SurfaceTextures surfaceTextures) noexcept {
}
commands->popDebugGroupLabel();
{
imguiSession_->beginFrame(framebufferDesc_,
getPlatform().getDisplayContext().pixelsPerPoint * 2);
imguiSession_->beginFrame(framebufferDesc_, getPlatform().getDisplayContext().pixelsPerPoint);
ImGui::Begin("Texture Viewer", nullptr, ImGuiWindowFlags_AlwaysAutoResize);
ImGui::Image(ImTextureID(texture1_.get()), ImVec2(512, 512));
ImGui::End();
Expand Down
3 changes: 1 addition & 2 deletions shell/renderSessions/YUVColorSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ void YUVColorSession::update(igl::SurfaceTextures surfaceTextures) noexcept {

// draw the YUV format name using ImGui
{
imguiSession_->beginFrame(framebufferDesc_,
getPlatform().getDisplayContext().pixelsPerPoint * 2);
imguiSession_->beginFrame(framebufferDesc_, getPlatform().getDisplayContext().pixelsPerPoint);
const ImGuiWindowFlags flags =
ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_AlwaysAutoResize |
ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing |
Expand Down

0 comments on commit ce53324

Please sign in to comment.