I'm working on a Mac, I have compiled and installed FreeGlut, but I can’t get the OpenGL 3.2 context. However, I can get it without any problems when using GLFW. Therefore, in GLFW, this code works fine:
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3); glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 2); glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwOpenWindow(500, 500, 8, 8, 8, 8, 24, 8, GLFW_WINDOW)
But this code does not work with FreeGlut (on glutCreateWindow ):
glutInitContextVersion (3, 2); glutInitContextProfile(GLUT_CORE_PROFILE); glutInitWindowSize (width, height); glutInitWindowPosition (300, 200); int window = glutCreateWindow (argv[0]);
Error in error:
X Error of failed request: BadRequest (invalid request code or no such operation) Major opcode of failed request: 34 (X_UngrabKey) Serial number of failed request: 29 Current serial number in output stream: 29
I am running MacOS X 10.8 Mountain Lion with Intel HD4000 graphics, installing XQuartz as my X11 server, and compiling and installing FreeGlut 2.8 from sources.
Does anyone know what the problem is?
opengl glfw macos freeglut glut
gambiting
source share