Scene fixing

This commit is contained in:
2025-10-08 06:53:37 -05:00
parent b00ca3d48c
commit e36256abe3
12 changed files with 75 additions and 40 deletions

View File

@@ -6,6 +6,7 @@
*/
#include "display/display.h"
#include "engine/engine.h"
#include "console/console.h"
#include "display/framebuffer.h"
#include "scene/scenemanager.h"
@@ -77,14 +78,14 @@ errorret_t displayUpdate(void) {
while(SDL_PollEvent(&event)) {
switch(event.type) {
case SDL_QUIT: {
consoleExec("quit");
ENGINE.running = false;
break;
}
case SDL_WINDOWEVENT: {
switch(event.window.event) {
case SDL_WINDOWEVENT_CLOSE: {
consoleExec("quit");
ENGINE.running = false;
break;
}
@@ -122,9 +123,9 @@ errorret_t displayUpdate(void) {
SDL_GL_SwapWindow(DISPLAY.window);
#endif
GLenum err = glGetError();
if (err != GL_NO_ERROR) {
printf("GL Error: %d\n", err);
GLenum err;
while((err = glGetError()) != GL_NO_ERROR) {
consolePrint("GL Error: %d\n", err);
}
// For now, we just return an OK error.