From aac07cef9af9b25e3b57ef1b541ecb0c2ee6e668 Mon Sep 17 00:00:00 2001 From: vinsentli Date: Wed, 4 Dec 2024 22:45:18 +0800 Subject: [PATCH] Code Format --- shell/renderSessions/NanovgSession.cpp | 12 +++++------- shell/renderSessions/NanovgSession.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/shell/renderSessions/NanovgSession.cpp b/shell/renderSessions/NanovgSession.cpp index 4c9271a069..decfd26661 100644 --- a/shell/renderSessions/NanovgSession.cpp +++ b/shell/renderSessions/NanovgSession.cpp @@ -68,20 +68,17 @@ int NanovgSession::loadDemoData(NVGcontext* vg, DemoData* data) { IGL_DEBUG_ASSERT(false, "Could not add font icons.\n"); return -1; } - data->fontNormal = - nvgCreateFont(vg, "sans", getImageFullPath("Roboto-Regular.ttf").c_str()); + data->fontNormal = nvgCreateFont(vg, "sans", getImageFullPath("Roboto-Regular.ttf").c_str()); if (data->fontNormal == -1) { IGL_DEBUG_ASSERT(false, "Could not add font italic.\n"); return -1; } - data->fontBold = - nvgCreateFont(vg, "sans-bold", getImageFullPath("Roboto-Bold.ttf").c_str()); + data->fontBold = nvgCreateFont(vg, "sans-bold", getImageFullPath("Roboto-Bold.ttf").c_str()); if (data->fontBold == -1) { IGL_DEBUG_ASSERT(false, "Could not add font bold.\n"); return -1; } - data->fontEmoji = - nvgCreateFont(vg, "emoji", getImageFullPath("NotoEmoji-Regular.ttf").c_str()); + data->fontEmoji = nvgCreateFont(vg, "emoji", getImageFullPath("NotoEmoji-Regular.ttf").c_str()); if (data->fontEmoji == -1) { IGL_DEBUG_ASSERT(false, "Could not add font emoji.\n"); return -1; @@ -113,7 +110,8 @@ void NanovgSession::initialize() noexcept { touchListener_ = std::make_shared(); getPlatform().getInputDispatcher().addTouchListener(touchListener_); - nvgContext_ = iglu::nanovg::CreateContext(&getPlatform().getDevice(), iglu::nanovg::NVG_ANTIALIAS | iglu::nanovg::NVG_STENCIL_STROKES); + nvgContext_ = iglu::nanovg::CreateContext( + &getPlatform().getDevice(), iglu::nanovg::NVG_ANTIALIAS | iglu::nanovg::NVG_STENCIL_STROKES); if (this->loadDemoData(nvgContext_, &nvgDemoData_) != 0) { IGL_DEBUG_ASSERT(false); diff --git a/shell/renderSessions/NanovgSession.h b/shell/renderSessions/NanovgSession.h index 2f660f3424..53bbc6cb17 100644 --- a/shell/renderSessions/NanovgSession.h +++ b/shell/renderSessions/NanovgSession.h @@ -53,7 +53,7 @@ class TouchListener : public ITouchListener { class NanovgSession : public RenderSession { public: explicit NanovgSession(std::shared_ptr platform) : RenderSession(std::move(platform)) { - depthTextureFormat_ = igl::TextureFormat::S8_UInt_Z24_UNorm; + depthTextureFormat_ = igl::TextureFormat::S8_UInt_Z24_UNorm; } void initialize() noexcept override; void update(igl::SurfaceTextures surfaceTextures) noexcept override;