Fix render to full viewport

This commit is contained in:
2024-02-20 05:18:32 -05:00
parent 817b0166c0
commit a38a83692f

View File

@@ -64,7 +64,7 @@ public:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, 1024, 768, 0, -1, 1);
glOrtho(0, getSize().x, getSize().y, 0, -1, 1);
glMatrixMode(GL_MODELVIEW);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
@@ -82,6 +82,11 @@ public:
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, getSize().x, getSize().y, 0, -1, 1);
glMatrixMode(GL_MODELVIEW);
JGL::J2D::FillRect2D(JGL::Colors::Blue, {32, 32}, {100.5, 100.5});
JGL::J2D::FillRect2D(JGL::Colors::Blue, {32, 32}, {100.5, 100.5});