Commits

Jason McKesson  committed 79e66e1

Issue 71: Added a test to make sure the GL window was properly created.
Will emit a warning if it isn't.

  • Participants
  • Parent commits d0ffd17

Comments (0)

Files changed (1)

File framework/framework.cpp

 #endif
 	glutInitWindowSize (width, height); 
 	glutInitWindowPosition (300, 200);
-	glutCreateWindow (argv[0]);
+	int window = glutCreateWindow (argv[0]);
+
+	glload::LoadFunctions();
 
 	glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION);
 
-	glload::LoadFunctions();
+	if(!glload::IsVersionGEQ(3, 3))
+	{
+		printf("Your OpenGL version is %i, %i. You must have at least OpenGL 3.3 to run this tutorial.\n",
+			glload::GetMajorVersion(), glload::GetMinorVersion());
+		glutDestroyWindow(window);
+		return 0;
+	}
 
 	if(glext_ARB_debug_output)
 	{