Fix some fucking weird quirk in a Fedora VM.

This commit is contained in:
Ritchie Cunningham 2025-09-21 17:30:22 +01:00
parent 03b56b44e4
commit 76e61336a1

View File

@ -45,9 +45,17 @@ int main(int argc, char** argv) {
/* Initialise GLEW. */
glewExperimental = GL_TRUE;
GLenum glewError = glewInit();
if(glewError != GLEW_OK) {
printf("Error initialising GLEW! %s\n", glewGetErrorString(glewError));
return 1;
if (glewError != GLEW_OK) {
/* NOTE:
* Dear future self, or other intrepid developer:
* In some environments (like the Fedora VM I tested),
* glewInit() returns an error here even when the context is valid.
* This is a known quirk. We print the error but continue anyway,
* because it's not fatal. Don't "fix" this by making it exit. Thank you.
* It's GLEW, not you.
*/
fprintf(stderr, "Warning: glewInit failed with error code %u: %s. Attempting to continue anyway.\n",
glewError, glewGetErrorString(glewError));
}
/* Configure OpenGL. */