Skip to content

Commit

Permalink
Clipping "spot" in "dual mode"
Browse files Browse the repository at this point in the history
  • Loading branch information
BrutPitt committed Sep 28, 2019
1 parent 3b1eadd commit 1d5da5c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions example/src/tools/imGuIZMO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ bool imguiGizmo::drawFunc(const char* label, float size)
draw_list->AddRectFilled(controlPos, controlPos + innerSize, col, style.FrameRounding);
}

draw_list->PushClipRect(controlPos, controlPos + innerSize, true);

const ImVec2 wpUV = ImGui::GetFontTexUvWhitePixel(); //culling versus
ImVec2 uv[4]; ImU32 col[4]; //buffers to storetransformed vtx & col for PrimVtx & PrimQuadUV

Expand Down Expand Up @@ -599,6 +601,8 @@ bool imguiGizmo::drawFunc(const char* label, float size)
} else draw3DSystem();
}

draw_list->PopClipRect();

ImGui::EndGroup();
ImGui::PopID();

Expand Down
8 changes: 7 additions & 1 deletion example/src/ui/uiMainDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ void mainImGuiDlgClass::renderImGui()


bool isVisible = true;

/*
if(ImGui::Begin("uuu", &isVisible)) {
static glm::quat qt2(1.0f,0,0,0);
static glm::quat qt4(1.0f,0,0,0);
ImGui::gizmo3D("##tZ", qt2, qt4, 800);
} ImGui::End();
*/
if(ImGui::Begin("qaternion Julia set", &isVisible)) {
ImGui::BeginGroup(); {

Expand Down
Binary file modified example/vs2017/.vs/qJulia/v16/.suo
Binary file not shown.
4 changes: 4 additions & 0 deletions imGuIZMO.quat/imGuIZMO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ bool imguiGizmo::drawFunc(const char* label, float size)
draw_list->AddRectFilled(controlPos, controlPos + innerSize, col, style.FrameRounding);
}

draw_list->PushClipRect(controlPos, controlPos + innerSize, true);

const ImVec2 wpUV = ImGui::GetFontTexUvWhitePixel(); //culling versus
ImVec2 uv[4]; ImU32 col[4]; //buffers to storetransformed vtx & col for PrimVtx & PrimQuadUV

Expand Down Expand Up @@ -599,6 +601,8 @@ bool imguiGizmo::drawFunc(const char* label, float size)
} else draw3DSystem();
}

draw_list->PopClipRect();

ImGui::EndGroup();
ImGui::PopID();

Expand Down

0 comments on commit 1d5da5c

Please sign in to comment.