Use CC for general compiling; get rid of more printfs; display opengl version on load

This commit is contained in:
2022-11-23 23:29:50 +00:00
parent 29c001e7df
commit a0f016a011
8 changed files with 80 additions and 103 deletions

View File

@@ -89,7 +89,12 @@ struct window *MakeSDLWindow(const char *name, int width, int height, uint32_t f
}
glfwMakeContextCurrent(w.window);
gladLoadGL(glfwGetProcAddress);
int version = gladLoadGL(glfwGetProcAddress);
if (!version) {
YughError("Failed to initialize OpenGL context.");
exit(1);
}
YughInfo("Loaded OpenGL %d.%d", GLAD_VERSION_MAJOR(version), GLAD_VERSION_MINOR(version));
glfwSwapInterval(1);
// Set callbacks