diff options
Diffstat (limited to '3rdparty/bgfx/examples/12-lod/lod.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/12-lod/lod.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/3rdparty/bgfx/examples/12-lod/lod.cpp b/3rdparty/bgfx/examples/12-lod/lod.cpp index 117b39980be..510565d0e2f 100644 --- a/3rdparty/bgfx/examples/12-lod/lod.cpp +++ b/3rdparty/bgfx/examples/12-lod/lod.cpp @@ -58,9 +58,9 @@ class ExampleLod : public entry::AppI m_textureBark = loadTexture("textures/bark1.dds"); const bgfx::Memory* stippleTex = bgfx::alloc(8*4); - memset(stippleTex->data, 0, stippleTex->size); + bx::memSet(stippleTex->data, 0, stippleTex->size); - for (uint32_t ii = 0; ii < 32; ++ii) + for (uint8_t ii = 0; ii < 32; ++ii) { stippleTex->data[knightTour[ii].m_y * 8 + knightTour[ii].m_x] = ii*4; } @@ -127,9 +127,9 @@ class ExampleLod : public entry::AppI | (m_mouseState.m_buttons[entry::MouseButton::Right ] ? IMGUI_MBUT_RIGHT : 0) | (m_mouseState.m_buttons[entry::MouseButton::Middle] ? IMGUI_MBUT_MIDDLE : 0) , m_mouseState.m_mz - , m_width - , m_height - ); + , uint16_t(m_width) + , uint16_t(m_height) + ); imguiBeginScrollArea("Toggle transitions", m_width - m_width / 5 - 10, 10, m_width / 5, m_height / 6, &m_scrollArea); imguiSeparatorLine(); @@ -146,7 +146,7 @@ class ExampleLod : public entry::AppI imguiEndFrame(); // Set view 0 default viewport. - bgfx::setViewRect(0, 0, 0, m_width, m_height); + bgfx::setViewRect(0, 0, 0, uint16_t(m_width), uint16_t(m_height) ); // This dummy draw call is here to make sure that view 0 is cleared // if no other draw calls are submitted to view 0. @@ -188,11 +188,11 @@ class ExampleLod : public entry::AppI bx::mtxLookAt(view, eye, at); float proj[16]; - bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f); + bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f, bgfx::getCaps()->homogeneousDepth); bgfx::setViewTransform(0, view, proj); // Set view 0 default viewport. - bgfx::setViewRect(0, 0, 0, m_width, m_height); + bgfx::setViewRect(0, 0, 0, uint16_t(m_width), uint16_t(m_height) ); } float mtx[16]; |