mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 04:53:06 +01:00
Merge branch 'master' of github.com:bkaradzic/bgfx
This commit is contained in:
@@ -129,8 +129,8 @@ class ExampleFontSDF : public entry::AppI
|
||||
, uint16_t(m_height)
|
||||
);
|
||||
|
||||
const int32_t guiPanelWidth = 325;
|
||||
const int32_t guiPanelHeight = 200;
|
||||
const float guiPanelWidth = 325.0f;
|
||||
const float guiPanelHeight = 200.0f;
|
||||
|
||||
ImGui::SetNextWindowPos(ImVec2(m_width - guiPanelWidth - 10.0f, 10.0f) );
|
||||
ImGui::Begin("Text Area"
|
||||
|
||||
@@ -958,7 +958,7 @@ public:
|
||||
uint8_t numLights = (uint8_t)m_numLights;
|
||||
s_uniforms.m_params.m_ambientPass = 1.0f;
|
||||
s_uniforms.m_params.m_lightingPass = 1.0f;
|
||||
s_uniforms.m_params.m_lightCount = m_numLights;
|
||||
s_uniforms.m_params.m_lightCount = float(m_numLights);
|
||||
s_uniforms.m_params.m_lightIndex = 0.0f;
|
||||
s_uniforms.m_color[3] = m_reflectionValue;
|
||||
|
||||
|
||||
@@ -1971,10 +1971,10 @@ class ExampleShadowmaps : public entry::AppI
|
||||
, m_viewState.m_height
|
||||
);
|
||||
|
||||
ImGui::SetNextWindowPos(ImVec2(m_viewState.m_width - 300 - 10, 10) );
|
||||
ImGui::SetNextWindowPos(ImVec2(float(m_viewState.m_width) - 300.0f - 10.0f, 10.0f) );
|
||||
ImGui::Begin("Settings"
|
||||
, NULL
|
||||
, ImVec2(300, 660)
|
||||
, ImVec2(300.0f, 660.0f)
|
||||
, ImGuiWindowFlags_AlwaysAutoResize
|
||||
);
|
||||
|
||||
@@ -2414,7 +2414,12 @@ if ( ImGui::RadioButton(_name, _var == _val )) _var = _val;
|
||||
BX_CHECK(maxNumSplits >= settings.m_numSplits, "Error! Max num splits.");
|
||||
|
||||
float splitSlices[maxNumSplits*2];
|
||||
splitFrustum(splitSlices, m_settings.m_numSplits, currentSmSettings->m_near, currentSmSettings->m_far, m_settings.m_splitDistribution);
|
||||
splitFrustum(splitSlices
|
||||
, uint8_t(m_settings.m_numSplits)
|
||||
, currentSmSettings->m_near
|
||||
, currentSmSettings->m_far
|
||||
, m_settings.m_splitDistribution
|
||||
);
|
||||
|
||||
// Update uniforms.
|
||||
for (uint8_t ii = 0, ff = 1; ii < m_settings.m_numSplits; ++ii, ff+=2)
|
||||
@@ -2808,7 +2813,7 @@ if ( ImGui::RadioButton(_name, _var == _val )) _var = _val;
|
||||
}
|
||||
else //LightType::DirectionalLight == settings.m_lightType)
|
||||
{
|
||||
drawNum = m_settings.m_numSplits;
|
||||
drawNum = uint8_t(m_settings.m_numSplits);
|
||||
}
|
||||
|
||||
for (uint8_t ii = 0; ii < drawNum; ++ii)
|
||||
|
||||
@@ -48,15 +48,6 @@ namespace stl = tinystl;
|
||||
} while(0)
|
||||
#endif // 0
|
||||
|
||||
#define EXPECT(_condition) \
|
||||
do { \
|
||||
if (!(_condition) ) \
|
||||
{ \
|
||||
printf("Error parsing at:\n" BX_FILE_LINE_LITERAL "\nExpected: " #_condition "\n"); \
|
||||
exit(EXIT_FAILURE); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#include <bx/bx.h>
|
||||
#include <bx/debug.h>
|
||||
#include <bx/commandline.h>
|
||||
@@ -626,7 +617,6 @@ int main(int _argc, const char* _argv[])
|
||||
}
|
||||
else if (0 == bx::strCmp(argv[0], "g") )
|
||||
{
|
||||
EXPECT(1 < argc);
|
||||
group.m_name = argv[1];
|
||||
}
|
||||
else if (*argv[0] == 'v')
|
||||
|
||||
Reference in New Issue
Block a user