Merge branch 'master' into navigation

This commit is contained in:
omar 2017-12-25 16:45:27 +01:00
commit ed2105d4a2
3 changed files with 6 additions and 4 deletions

View File

@ -27,7 +27,6 @@ void CreateRenderTarget()
render_target_view_desc.ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2D;
g_pSwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*)&pBackBuffer);
g_pd3dDevice->CreateRenderTargetView(pBackBuffer, &render_target_view_desc, &g_mainRenderTargetView);
g_pd3dDevice->OMSetRenderTargets(1, &g_mainRenderTargetView, NULL);
pBackBuffer->Release();
}
@ -196,6 +195,7 @@ int main(int, char**)
}
// Rendering
g_pd3dDevice->OMSetRenderTargets(1, &g_mainRenderTargetView, NULL);
g_pd3dDevice->ClearRenderTargetView(g_mainRenderTargetView, (float*)&clear_color);
ImGui::Render();

View File

@ -27,7 +27,6 @@ void CreateRenderTarget()
render_target_view_desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
g_pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&pBackBuffer);
g_pd3dDevice->CreateRenderTargetView(pBackBuffer, &render_target_view_desc, &g_mainRenderTargetView);
g_pd3dDeviceContext->OMSetRenderTargets(1, &g_mainRenderTargetView, NULL);
pBackBuffer->Release();
}
@ -199,6 +198,7 @@ int main(int, char**)
}
// Rendering
g_pd3dDeviceContext->OMSetRenderTargets(1, &g_mainRenderTargetView, NULL);
g_pd3dDeviceContext->ClearRenderTargetView(g_mainRenderTargetView, (float*)&clear_color);
ImGui::Render();

View File

@ -3180,9 +3180,10 @@ void ImGui::NewFrame()
IM_ASSERT(g.MovingWindow->MoveId == g.MovingWindowMoveId);
if (g.IO.MouseDown[0])
{
g.MovingWindow->RootWindow->PosFloat += g.IO.MouseDelta;
if (g.IO.MouseDelta.x != 0.0f || g.IO.MouseDelta.y != 0.0f)
ImVec2 pos = g.IO.MousePos - g.ActiveIdClickOffset;
if (g.MovingWindow->RootWindow->PosFloat.x != pos.x || g.MovingWindow->RootWindow->PosFloat.y != pos.y)
MarkIniSettingsDirty(g.MovingWindow->RootWindow);
g.MovingWindow->RootWindow->PosFloat = pos;
FocusWindow(g.MovingWindow);
}
else
@ -3745,6 +3746,7 @@ void ImGui::EndFrame()
g.MovingWindow = g.HoveredWindow;
g.MovingWindowMoveId = g.MovingWindow->MoveId;
SetActiveID(g.MovingWindowMoveId, g.HoveredRootWindow);
g.ActiveIdClickOffset = g.IO.MousePos - g.MovingWindow->RootWindow->Pos;
}
}
else if (g.NavWindow != NULL && GetFrontMostModalRootWindow() == NULL)