From f6a8c7d861b196bff1d2f3d8b462deb32f3d1b71 Mon Sep 17 00:00:00 2001 From: vinsentli Date: Wed, 18 Dec 2024 12:19:28 +0800 Subject: [PATCH] drawNanovg : rename param --- shell/renderSessions/NanovgSession.cpp | 8 ++++---- shell/renderSessions/NanovgSession.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/renderSessions/NanovgSession.cpp b/shell/renderSessions/NanovgSession.cpp index c773650e51..3a0322d867 100644 --- a/shell/renderSessions/NanovgSession.cpp +++ b/shell/renderSessions/NanovgSession.cpp @@ -146,15 +146,15 @@ void NanovgSession::update(igl::SurfaceTextures surfaceTextures) noexcept { RenderSession::update(surfaceTextures); } -void NanovgSession::drawNanovg(float __width, - float __height, +void NanovgSession::drawNanovg(float framebuffferWidth, + float framebufferHeight, std::shared_ptr command) { NVGcontext* vg = nvgContext_; float pxRatio = 2.0f; - const float width = __width / pxRatio; - const float height = __height / pxRatio; + const float width = framebuffferWidth / pxRatio; + const float height = framebufferHeight / pxRatio; #if IGL_PLATFORM_IOS || IGL_PLATFORM_ANDROID int mx = touchListener_->touchX; diff --git a/shell/renderSessions/NanovgSession.h b/shell/renderSessions/NanovgSession.h index f5657b3e77..38f3c9518a 100644 --- a/shell/renderSessions/NanovgSession.h +++ b/shell/renderSessions/NanovgSession.h @@ -58,7 +58,7 @@ class NanovgSession : public RenderSession { void update(igl::SurfaceTextures surfaceTextures) noexcept override; private: - void drawNanovg(float width, float height, std::shared_ptr command); + void drawNanovg(float framebuffferWidth, float framebufferHeight, std::shared_ptr command); int loadDemoData(NVGcontext* vg, DemoData* data); private: