summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/18-ibl/ibl.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/18-ibl/ibl.cpp')
-rw-r--r--3rdparty/bgfx/examples/18-ibl/ibl.cpp47
1 files changed, 30 insertions, 17 deletions
diff --git a/3rdparty/bgfx/examples/18-ibl/ibl.cpp b/3rdparty/bgfx/examples/18-ibl/ibl.cpp
index 06f280f1c64..39d814514d4 100644
--- a/3rdparty/bgfx/examples/18-ibl/ibl.cpp
+++ b/3rdparty/bgfx/examples/18-ibl/ibl.cpp
@@ -553,8 +553,8 @@ int _main_(int _argc, char** _argv)
| (mouseState.m_buttons[entry::MouseButton::Right ] ? IMGUI_MBUT_RIGHT : 0)
| (mouseState.m_buttons[entry::MouseButton::Middle] ? IMGUI_MBUT_MIDDLE : 0)
, mouseState.m_mz
- , width
- , height
+ , uint16_t(width)
+ , uint16_t(height)
);
static int32_t rightScrollArea = 0;
@@ -564,10 +564,16 @@ int _main_(int _argc, char** _argv)
imguiIndent();
imguiBool("IBL Diffuse", settings.m_doDiffuseIbl);
imguiBool("IBL Specular", settings.m_doSpecularIbl);
- currentLightProbe = LightProbe::Enum(imguiTabs(currentLightProbe, true, ImguiAlign::LeftIndented, 16, 2, 2
- , "Bolonga"
- , "Kyoto"
- ) );
+ currentLightProbe = LightProbe::Enum(imguiTabs(
+ uint8_t(currentLightProbe)
+ , true
+ , ImguiAlign::LeftIndented
+ , 16
+ , 2
+ , 2
+ , "Bolonga"
+ , "Kyoto"
+ ) );
if (imguiCube(lightProbes[currentLightProbe].m_tex, settings.m_lod, settings.m_crossCubemapPreview, true) )
{
settings.m_crossCubemapPreview = ImguiCubemap::Enum( (settings.m_crossCubemapPreview+1) % ImguiCubemap::Count);
@@ -592,14 +598,21 @@ int _main_(int _argc, char** _argv)
imguiIndent();
{
int32_t selection;
- if (0.0f == settings.m_bgType) { selection = 0; }
- else if (7.0f == settings.m_bgType) { selection = 2; }
- else { selection = 1; }
- selection = imguiTabs(selection, true, ImguiAlign::LeftIndented, 16, 2, 3
- , "Skybox"
- , "Radiance"
- , "Irradiance"
- );
+ if (0.0f == settings.m_bgType) { selection = UINT8_C(0); }
+ else if (7.0f == settings.m_bgType) { selection = UINT8_C(2); }
+ else { selection = UINT8_C(1); }
+
+ selection = imguiTabs(
+ uint8_t(selection)
+ , true
+ , ImguiAlign::LeftIndented
+ , 16
+ , 2
+ , 3
+ , "Skybox"
+ , "Radiance"
+ , "Irradiance"
+ );
if (0 == selection) { settings.m_bgType = 0.0f; }
else if (2 == selection) { settings.m_bgType = 7.0f; }
else { settings.m_bgType = settings.m_radianceSlider; }
@@ -622,7 +635,7 @@ int _main_(int _argc, char** _argv)
imguiLabel("Mesh:");
imguiIndent();
- settings.m_meshSelection = imguiChoose(settings.m_meshSelection, "Bunny", "Orbs");
+ settings.m_meshSelection = uint8_t(imguiChoose(settings.m_meshSelection, "Bunny", "Orbs") );
imguiUnindent();
const bool isBunny = (0 == settings.m_meshSelection);
@@ -719,8 +732,8 @@ int _main_(int _argc, char** _argv)
bgfx::setViewTransform(1, view, proj);
// View rect.
- bgfx::setViewRect(0, 0, 0, width, height);
- bgfx::setViewRect(1, 0, 0, width, height);
+ bgfx::setViewRect(0, 0, 0, uint16_t(width), uint16_t(height) );
+ bgfx::setViewRect(1, 0, 0, uint16_t(width), uint16_t(height) );
// Env rotation.
const float amount = bx::fmin(deltaTimeSec/0.12f, 1.0f);