mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Cleanup.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) )
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user