have opengl gracefully fail
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoIxD 2026-04-27 00:30:58 -07:00
commit 73b320fc18

View file

@ -53,7 +53,9 @@ int main() {
MwNtitle, TITLE,
NULL);
opengl = MwCreateWidget(MwOpenGLClass, "opengl", window, 50, 50, 400, 400);
if(!opengl) {
MwMessageBox(NULL, "Unable to create OpenGL window.", "Error", MwMB_ICONERROR);
} else {
MwOpenGLMakeCurrent(opengl);
init();
@ -65,6 +67,7 @@ int main() {
MwAddTickList(opengl);
MwAddUserHandler(opengl, MwNkeyHandler, key_pressed, NULL);
}
MwLoop(window);
}