With SetWindowPos there was a strange flickering of the window when the user tried to grab the window. This is fixed with SetNextWindowPos.
This commit is contained in:
attilaz 2017-06-11 01:01:42 +02:00 коммит произвёл Branimir Karadžić
Родитель 019d9909c1
Коммит c40c83d337
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -131,12 +131,12 @@ class ExampleLod : public entry::AppI
, uint16_t(m_height)
);
ImGui::SetNextWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
ImGui::Begin("LOD Settings"
, NULL
, ImVec2(m_width / 5.0f, m_height / 6.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);
ImGui::SetWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
ImGui::Checkbox("Transition", &m_transitions);

Просмотреть файл

@ -430,12 +430,12 @@ class ExampleDeferred : public entry::AppI
, uint16_t(m_height)
);
ImGui::SetNextWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
ImGui::Begin("Deferred Rendering Settings"
, NULL
, ImVec2(m_width / 5.0f, m_height / 3.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);
ImGui::SetWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
ImGui::SliderInt("Num lights", &m_numLights, 1, 2048);
ImGui::Checkbox("Show G-Buffer.", &m_showGBuffer);

Просмотреть файл

@ -262,8 +262,8 @@ class ExamplePom : public entry::AppI
, uint16_t(m_height)
);
ImGui::SetNextWindowPos(ImVec2(m_width - 240.0f, 20.0f));
ImGui::Begin("Properties");
ImGui::SetWindowPos(ImVec2(m_width - 240.0f, 20.0f));
ImGui::RadioButton("No bump mapping", &m_shading_type, 0);
ImGui::RadioButton("Normal mapping", &m_shading_type, 1);