sdl and opengl contexts

This commit is contained in:
2025-11-23 10:10:57 +00:00
parent bed8e5e363
commit d5ac791a1a
6 changed files with 218 additions and 12 deletions

View File

@@ -0,0 +1,19 @@
#include "engine/sdl.hpp"
#include "engine/opengl.hpp"
int main(int argc, char* argv[]) {
SDLWindow window("My SDL Application", 800, 600);
if (!window.isRunning()) { return -1; }
OpenGLContext glContext(window);
if (!glContext.isInitialized()) { return -1; }
window.setPosition(SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
window.showWindow();
while (window.isRunning()) {
window.pollEvents();
// Application logic and rendering would go here
glContext.swapBuffers();
}
return 0;
}