cleaned more stuff

This commit is contained in:
2025-08-22 12:40:18 -05:00
parent b1be1deb79
commit 94ad64675d
15 changed files with 467 additions and 211 deletions

View File

@@ -7,7 +7,7 @@
#include "display/display.h"
#include "console/console.h"
#include "display/camera.h"
#include "display/mesh/mesh.h"
display_t DISPLAY;
@@ -82,11 +82,21 @@ errorret_t displayUpdate(void) {
}
}
SDL_GL_SwapWindow(DISPLAY.window);
// Set viewport size.
int32_t windowWidth, windowHeight;
SDL_GetWindowSize(DISPLAY.window, &windowWidth, &windowHeight);
glViewport(0, 0, windowWidth, windowHeight);
#endif
meshDraw(&mesh, 0, -1);
if(CAMERA_MAIN != -1) {
cameraPush(CAMERA_MAIN);
meshDraw(&mesh, 0, -1);
cameraPop();
}
#if DUSK_DISPLAY_SDL2
SDL_GL_SwapWindow(DISPLAY.window);
#endif
// For now, we just return an OK error.
errorOk();