-
Notifications
You must be signed in to change notification settings - Fork 911
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
Gizmo not showing in custom window ( docking branch ) #327
Comments
This works for me:
|
Hello @v71. Since pull request #203, a special behavior has been introduced which I'm unsure is always desirable. Specifically, this pull request fixes a bug that allowed interaction with the gizmo even when another window was blocking it. The solution introduced a behavior where, when the docking branch is used, you must use ImGuizmo inside the code to create the window over which you want the gizmo to be visible. If you use ImGuizmo outside, it will be considered that the window covers the gizmo. Are you currently using this approach? I'm considering adding a pull request to change this, as it's not always feasible to use ImGuizmo inside a window. Additionally, the use of |
Yes I am currently using what you have mentioned, the problem still persists. |
I made commit 315acb2 in a fork, which introduces a few changes and hopefully addresses the issue you mentioned. By using the changes from that commit, you need to explicitly specify the name of the ImGui window in which you want the gizmo to be interactable, before the Example of use: ImGuizmo::SetOwnerWindowName(<name of the window>); Can you check the modifications and let me know if the issue is resolved now? |
Will do as soons as possible and will let you know, i have to add that to use the docking window, i had to use another fbo ad address all the rendering there, could this be a problem ? |
I did almost the same in my fork vengi-voxel/vengi@59cd9c3 |
When using a custom window in docking branch, the gizmo library creates a debug window , detached from input ( gizmos are drawn but not clickable ) . I have tried using ImGuizmo::SetDrawlist(I); , with various position in the code and derivations , like this
ImGuizmo::SetDrawlist(ImGui::GetBackgroundDrawList(ImGui::GetMainViewport()));
without success, what I am doing wrong ?
this is the code I use
ImGuiIO& io = ImGui::GetIO();
float viewManipulateRight = io.DisplaySize.x;
float viewManipulateTop = 0;
static ImGuiWindowFlags gizmoWindowFlags = 0;
ImGuizmo::BeginFrame();
ImGuizmo::SetRect(0, 0, io.DisplaySize.x, io.DisplaySize.y);
ImGuizmo::SetDrawlist(ImGui::GetBackgroundDrawList(ImGui::GetMainViewport()));
ImGuizmo::DrawGrid(cameraView, cameraProjection, identityMatrix, 100.f);
ImGuizmo::DrawCubes(cameraView, cameraProjection, &objectMatrix[0][0], gizmoCount);
ImGuizmo::Manipulate(cameraView, cameraProjection, mCurrentGizmoOperation, mCurrentGizmoMode, matrix, NULL, useSnap ? &snap[0] : NULL, boundSizing ? bounds : NULL, boundSizingSnap ? boundsSnap : NULL);
ImGuizmo::ViewManipulate(cameraView, camDistance, ImVec2(viewManipulateRight - 128, viewManipulateTop), ImVec2(128, 128), 0x10101010);
The text was updated successfully, but these errors were encountered: