Skip to content

Commit

Permalink
Fix Gizmo
Browse files Browse the repository at this point in the history
  • Loading branch information
ProtectedVariable committed Dec 12, 2024
1 parent 41bcfdd commit f891886
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 3 additions & 1 deletion ICE/System/src/RenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ void RenderSystem::setTarget(const std::shared_ptr<Framebuffer> &fb) {
}

void RenderSystem::setViewport(int x, int y, int w, int h) {
m_renderer->resize(w, h);
if (w > 0 && h > 0) {
m_renderer->resize(w, h);
}
}

} // namespace ICE
3 changes: 1 addition & 2 deletions ICEBERG/UI/ViewportWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ class ViewportWidget : public Widget {
callback("lc_pressed");
}
}
ImVec2 view = ImGui::GetContentRegionAvail();
callback("resize", window_width, window_height);
ImGuizmo::SetRect(pos.x, pos.y, view.x, view.y);
ImGuizmo::SetRect(pos.x, pos.y, window_width, window_height);
ImGuizmo::SetDrawlist(ImGui::GetWindowDrawList());
ImGui::End();
}
Expand Down
9 changes: 0 additions & 9 deletions ICEBERG/src/Iceberg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@

#include "Editor.h"
#include "ProjectSelection.h"
#ifdef __cplusplus
extern "C" {
#endif

__declspec(dllexport) unsigned long NvOptimusEnablement = 1;
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;

#ifdef __cplusplus
}
#endif
enum class UIState { PROJECT_SELECTION, EDITOR };

class Iceberg {
Expand Down

0 comments on commit f891886

Please sign in to comment.