Merge branch 'master' into docking

# Conflicts:
#	examples/imgui_impl_opengl2.cpp
#	examples/imgui_impl_opengl3.cpp
#	imgui.cpp
#	imgui_widgets.cpp
This commit is contained in:
omar
2019-02-11 18:53:24 +01:00
23 changed files with 244 additions and 138 deletions

View File

@ -210,7 +210,7 @@ void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data)
// Render command lists
int vtx_offset = 0;
int idx_offset = 0;
ImVec2 pos = draw_data->DisplayPos;
ImVec2 clip_off = draw_data->DisplayPos;
for (int n = 0; n < draw_data->CmdListsCount; n++)
{
const ImDrawList* cmd_list = draw_data->CmdLists[n];
@ -225,7 +225,7 @@ void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data)
else
{
// Apply scissor/clipping rectangle
const D3D11_RECT r = { (LONG)(pcmd->ClipRect.x - pos.x), (LONG)(pcmd->ClipRect.y - pos.y), (LONG)(pcmd->ClipRect.z - pos.x), (LONG)(pcmd->ClipRect.w - pos.y) };
const D3D11_RECT r = { (LONG)(pcmd->ClipRect.x - clip_off.x), (LONG)(pcmd->ClipRect.y - clip_off.y), (LONG)(pcmd->ClipRect.z - clip_off.x), (LONG)(pcmd->ClipRect.w - clip_off.y) };
ctx->RSSetScissorRects(1, &r);
// Bind texture, Draw