From 4de44ba1e25c5b0020ae14c9fbc84de3760fe597 Mon Sep 17 00:00:00 2001 From: Redacted Date: Mon, 5 Aug 2024 19:49:30 -0400 Subject: [PATCH] Put this code back because it got removed again. Make sure you have the latest commit before doing anything :/ --- main.cpp | 3 ++- src/JGL.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index a5de88a..50618da 100644 --- a/main.cpp +++ b/main.cpp @@ -157,6 +157,7 @@ public: Vector3 textAngle = {0,0,0}; void display() { + JGL::Update(getSize()); textAngle.y += 2.0f; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); @@ -251,7 +252,7 @@ int main(int argc, char** argv) { window->setRenderer(RenderingAPI::OPENGL); window->Open(); window->initGL(); - window->setResizable(false); + window->setResizable(true); while (window->isAlive()) { window->pollEvents(); diff --git a/src/JGL.cpp b/src/JGL.cpp index 2a276df..cad2397 100644 --- a/src/JGL.cpp +++ b/src/JGL.cpp @@ -34,6 +34,7 @@ namespace JGL { glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); + glViewport(0, 0, wS.x, wS.y); glOrtho(0, wS.x, wS.y, 0, -1, 1); glMatrixMode(GL_MODELVIEW); glPushMatrix();