This commit is contained in:
Branimir Karadžić
2017-06-26 22:51:56 -07:00
parent 6e08b6a42a
commit 43fb2f6f4b
14 changed files with 82 additions and 47 deletions

View File

@@ -311,7 +311,7 @@ public:
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("HDR Settings"
ImGui::Begin("Settings"
, NULL
, ImVec2(m_width / 5.0f, m_height / 2.0f)
, ImGuiWindowFlags_AlwaysAutoResize

View File

@@ -140,20 +140,18 @@ public:
bool restart = showExampleDialog(this);
const float guiPanelWidth = 325.0f;
const float guiPanelHeight = 200.0f;
ImGui::SetNextWindowPos(ImVec2(m_width - guiPanelWidth - 10.0f, 10.0f) );
ImGui::Begin("Text Area"
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2(guiPanelWidth, guiPanelHeight)
, ImVec2(m_width / 5.0f, m_height / 2.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);
ImGui::Separator();
bool recomputeVisibleText = false;
recomputeVisibleText |= ImGui::SliderFloat("Number of lines", &m_visibleLineCount, 1.0f, 177.0f);
recomputeVisibleText |= ImGui::SliderFloat("# of lines", &m_visibleLineCount, 1.0f, 177.0f);
if (ImGui::SliderFloat("Font size", &m_textSize, 6.0f, 64.0f) )
{

View File

@@ -142,8 +142,11 @@ public:
bool restart = showExampleDialog(this);
ImGui::SetNextWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
ImGui::Begin("LOD Settings"
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2(m_width / 5.0f, m_height / 6.0f)
, ImGuiWindowFlags_AlwaysAutoResize

View File

@@ -924,8 +924,11 @@ public:
bool restart = showExampleDialog(this);
ImGui::SetNextWindowPos(ImVec2(m_viewState.m_width - m_viewState.m_width / 5.0f - 10.0f, 10.0f) );
ImGui::Begin("Stencil Settings"
ImGui::SetNextWindowPos(
ImVec2(m_viewState.m_width - m_viewState.m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2(m_viewState.m_width / 5.0f, m_viewState.m_height / 2.0f)
, ImGuiWindowFlags_AlwaysAutoResize

View File

@@ -1980,12 +1980,15 @@ public:
bool restart = showExampleDialog(this);
ImGui::SetNextWindowPos(ImVec2(float(m_viewState.m_width) - 300.0f - 10.0f, 10.0f) );
ImGui::SetNextWindowPos(
ImVec2(m_viewState.m_width - m_viewState.m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2(300.0f, 660.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);
, NULL
, ImVec2(m_viewState.m_width / 5.0f, m_viewState.m_height - 20.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);
#define IMGUI_FLOAT_SLIDER(_name, _val) \
ImGui::SliderFloat(_name \
@@ -2079,12 +2082,15 @@ public:
ImGui::End();
#undef IMGUI_RADIO_BUTTON
ImGui::SetNextWindowPos(ImVec2(10,70) );
ImGui::SetNextWindowPos(
ImVec2(10.0f, 260.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Light"
, NULL
, ImVec2(330, 334)
, ImGuiWindowFlags_AlwaysAutoResize
);
, NULL
, ImVec2(m_viewState.m_width / 5.0f, 350.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);
ImGui::PushItemWidth(185.0f);
bool bLtChanged = false;

View File

@@ -289,11 +289,13 @@ public:
bool restart = showExampleDialog(this);
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::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2((float)m_width / 4.0f, (float)m_height / 3.0f)
, ImVec2(m_width / 5.0f, m_height / 3.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);

View File

@@ -434,8 +434,11 @@ public:
m_lightBuffer = bgfx::createFrameBuffer(uint16_t(m_width), uint16_t(m_height), bgfx::TextureFormat::BGRA8, samplerFlags);
}
ImGui::SetNextWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
ImGui::Begin("Deferred Rendering Settings"
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2(m_width / 5.0f, m_height / 3.0f)
, ImGuiWindowFlags_AlwaysAutoResize

View File

@@ -145,11 +145,10 @@ public:
const bool computeSupported = !!(caps->supported & BGFX_CAPS_COMPUTE);
const bool indirectSupported = !!(caps->supported & BGFX_CAPS_DRAW_INDIRECT);
imguiCreate();
if (computeSupported)
{
// Imgui.
imguiCreate();
bgfx::VertexDecl quadVertexDecl;
quadVertexDecl.begin()
.add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float)
@@ -277,8 +276,11 @@ public:
if (computeSupported)
{
ImGui::SetNextWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
ImGui::Begin("N-body Settings"
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2(m_width / 5.0f, m_height / 1.5f)
, ImGuiWindowFlags_AlwaysAutoResize

View File

@@ -404,11 +404,13 @@ public:
bool restart = showExampleDialog(this);
ImGui::SetNextWindowPos(ImVec2((float)m_width - (float)m_width / 5.0f - 10.0f, 10.0f) );
ImGui::SetNextWindowSize(ImVec2((float)m_width / 5.0f, (float)m_height / 3.0f) );
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2((float)m_width / 5.0f, (float)m_height / 3.0f)
, ImVec2(m_width / 5.0f, m_height / 3.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);

View File

@@ -407,11 +407,13 @@ public:
bool restart = showExampleDialog(this);
ImGui::SetNextWindowPos(ImVec2((float)m_width - (float)m_width / 5.0f - 10.0f, 10.0f) );
ImGui::SetNextWindowSize(ImVec2((float)m_width / 5.0f, (float)m_height * 0.75f) );
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2((float)m_width / 4.0f, (float)m_height * 0.75f)
, ImVec2(m_width / 5.0f, m_height * 0.75f)
, ImGuiWindowFlags_AlwaysAutoResize
);

View File

@@ -367,8 +367,11 @@ public:
bool restart = showExampleDialog(this);
ImGui::SetNextWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
ImGui::Begin("Picking Render Target"
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2(m_width / 5.0f, m_height / 2.0f)
, ImGuiWindowFlags_AlwaysAutoResize

View File

@@ -591,9 +591,13 @@ public:
bool restart = showExampleDialog(this);
ImGui::Begin("Reflective Shadow Map"
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2(300.0f, 400.0f)
, ImVec2(m_width / 5.0f, m_height / 3.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);

View File

@@ -371,7 +371,7 @@ public:
ImVec2(m_width - m_width / 4.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Properties"
ImGui::Begin("Settings"
, NULL
, ImVec2(m_width / 4.0f, m_height - 20.0f)
, ImGuiWindowFlags_AlwaysAutoResize

View File

@@ -263,8 +263,15 @@ public:
bool restart = showExampleDialog(this);
ImGui::SetNextWindowPos(ImVec2(m_width - 240.0f, 20.0f));
ImGui::Begin("Properties");
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
, ImGuiSetCond_FirstUseEver
);
ImGui::Begin("Settings"
, NULL
, ImVec2(m_width / 5.0f, m_height / 2.0f)
, ImGuiWindowFlags_AlwaysAutoResize
);
ImGui::RadioButton("No bump mapping", &m_shading_type, 0);
ImGui::RadioButton("Normal mapping", &m_shading_type, 1);