diff options
Diffstat (limited to '3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp b/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp index 61591b5d6da..01c6bd08bda 100644 --- a/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp +++ b/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp @@ -15,9 +15,6 @@ #include "font/text_buffer_manager.h" #include "imgui/imgui.h" -#include <stdio.h> -#include <string.h> - TrueTypeHandle loadTtf(FontManager* _fm, const char* _filePath) { uint32_t size; @@ -105,9 +102,9 @@ 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) + ); imguiBeginScrollArea("Text Area" , width - guiPanelWidth - 10 @@ -144,7 +141,7 @@ int _main_(int _argc, char** _argv) imguiEndFrame(); // Set view 0 default viewport. - bgfx::setViewRect(0, 0, 0, width, height); + bgfx::setViewRect(0, 0, 0, uint16_t(width), uint16_t(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. @@ -176,7 +173,7 @@ int _main_(int _argc, char** _argv) if (NULL != hmd && 0 != (hmd->flags & BGFX_HMD_RENDERING) ) { float proj[16]; - bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f); + bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f, bgfx::getCaps()->homogeneousDepth); static float time = 0.0f; time += 0.05f; @@ -198,7 +195,7 @@ int _main_(int _argc, char** _argv) float ortho[16]; bx::mtxOrtho(ortho, centering, width + centering, height + centering, centering, -1.0f, 1.0f); bgfx::setViewTransform(0, view, ortho); - bgfx::setViewRect(0, 0, 0, width, height); + bgfx::setViewRect(0, 0, 0, uint16_t(width), uint16_t(height) ); } //very crude approximation :( |