Graphics refactor finished

This commit is contained in:
IlyaShurupov 2024-03-20 11:31:50 +03:00
parent 37b4993b70
commit 476da8bb92
12 changed files with 114 additions and 110 deletions

View file

@ -138,8 +138,11 @@ void Canvas::deleteImageHandle(ImageHandle image) {
void Canvas::drawBegin() {
const auto size = mContext->window->getSize();
nvgBeginFrame(mContext->vg, size.x, size.y, 1.0);
glViewport(0, 0, size.x, size.y);
}
void Canvas::drawEnd() {
const auto size = mContext->window->getSize();
glViewport(0, 0, size.x, size.y);
nvgEndFrame(mContext->vg);
}