Fix some fucking weird quirk in a Fedora VM.
This commit is contained in:
parent
03b56b44e4
commit
76e61336a1
@ -45,9 +45,17 @@ int main(int argc, char** argv) {
|
|||||||
/* Initialise GLEW. */
|
/* Initialise GLEW. */
|
||||||
glewExperimental = GL_TRUE;
|
glewExperimental = GL_TRUE;
|
||||||
GLenum glewError = glewInit();
|
GLenum glewError = glewInit();
|
||||||
if(glewError != GLEW_OK) {
|
if (glewError != GLEW_OK) {
|
||||||
printf("Error initialising GLEW! %s\n", glewGetErrorString(glewError));
|
/* NOTE:
|
||||||
return 1;
|
* 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. */
|
/* Configure OpenGL. */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user