19-oit: switched to imgui (#1172)

This commit is contained in:
attilaz 2017-06-22 01:59:47 +02:00 committed by Branimir Karadžić
parent 6845d75656
commit d2310cbc2a

View File

@ -211,7 +211,6 @@ class ExampleOIT : public entry::AppI
m_fbh.idx = bgfx::kInvalidHandle;
m_mode = 1;
m_scrollArea = 0;
m_frontToBack = true;
m_fadeInOut = false;
@ -279,30 +278,28 @@ class ExampleOIT : public entry::AppI
, uint16_t(m_height)
);
imguiBeginScrollArea("Settings", m_width - m_width / 4 - 10, 10, m_width / 4, m_height / 3, &m_scrollArea);
imguiSeparatorLine();
ImGui::SetNextWindowPos(ImVec2((float)m_width - (float)m_width / 4.0f - 10.0f, 10.0f) );
ImGui::SetNextWindowSize(ImVec2((float)m_width / 4.0f, (float)m_height / 3.0f) );
ImGui::Begin("Settings"
, NULL
, ImVec2((float)m_width / 4.0f, (float)m_height / 3.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);
ImGui::Separator();
imguiLabel("Blend mode:");
ImGui::Text("Blend mode:");
m_mode = imguiChoose(m_mode
, "None"
, "Separate"
, "MRT Independent"
);
ImGui::RadioButton("None", &m_mode, 0);
ImGui::RadioButton("Separate", &m_mode, 1);
ImGui::RadioButton("MRT Independent", &m_mode, 2);
imguiSeparatorLine();
ImGui::Separator();
ImGui::Checkbox("Front to back", &m_frontToBack);
ImGui::Checkbox("Fade in/out", &m_fadeInOut);
if (imguiCheck("Front to back", m_frontToBack) )
{
m_frontToBack ^= true;
}
if (imguiCheck("Fade in/out", m_fadeInOut) )
{
m_fadeInOut ^= true;
}
imguiEndScrollArea();
ImGui::End();
imguiEndFrame();
// Set view 0 default viewport.
@ -492,8 +489,7 @@ class ExampleOIT : public entry::AppI
uint32_t m_debug;
uint32_t m_reset;
uint32_t m_mode;
int32_t m_scrollArea;
int32_t m_mode;
bool m_frontToBack;
bool m_fadeInOut;