From 997aeafef549897045699156e019643179f00d37 Mon Sep 17 00:00:00 2001 From: zqiangang <62784571+zqiangang@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:22:42 +0800 Subject: [PATCH] fix bug: updateViewport adjust size of canvas exception (#50) --- src/render/hw/hw_canvas.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/hw/hw_canvas.cc b/src/render/hw/hw_canvas.cc index c530b779..61f0d262 100644 --- a/src/render/hw/hw_canvas.cc +++ b/src/render/hw/hw_canvas.cc @@ -93,7 +93,7 @@ uint32_t HWCanvas::onGetWidth() const { return width_; } uint32_t HWCanvas::onGetHeight() const { return height_; } void HWCanvas::onUpdateViewport(uint32_t width, uint32_t height) { - mvp_ = glm::ortho(0.f, 0.f, (float)height, (float)width); + mvp_ = glm::ortho(0.f, (float)width, (float)height, 0.f); width_ = width; height_ = height; }