refactor: reduce Window references

This commit is contained in:
MihailRis
2025-04-02 14:55:53 +03:00
parent 896ab3597a
commit 74a94f869c
19 changed files with 151 additions and 155 deletions
+4 -3
View File
@@ -34,14 +34,15 @@ void MenuScreen::draw(float delta) {
Window::clear();
Window::setBgColor(glm::vec3(0.2f));
uint width = Window::width;
uint height = Window::height;
uicamera->setFov(Window::height);
uicamera->setAspectRatio(width / static_cast<float>(height));
auto uishader = assets->get<Shader>("ui");
uishader->use();
uishader->uniformMatrix("u_projview", uicamera->getProjView());
uint width = Window::width;
uint height = Window::height;
auto bg = assets->get<Texture>("gui/menubg");
batch->begin();
batch->texture(bg);