Skip to content

Commit

Permalink
fix bug: updateViewport adjust size of canvas exception (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
zqiangang committed Oct 9, 2023
1 parent b6cdb45 commit 997aeaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/hw/hw_canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 997aeaf

Please sign in to comment.