Reputation: 583
I'm trying to make an OpenGL application on MacOS X Mavericks. For this I'm using Glew, FreeGLUT (adding the due search paths on project settings and adding the linker flags also), and also the MacOS OpenGL framework.
The problem is, as soon as I get to glutCreateWindow
, the program crashes with the following 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
As I've seen on another post this may be because of the window server, but I have installed XQuartz 2.7.7 as so many have suggested and I still can't do it.
Has anyone ever tried to use FreeGLUT in similar conditions?
Upvotes: 0
Views: 872
Reputation: 1
I solved by modifying my code like this: glutInitContextVersion(2, 1);
The reason is X11 doesn't support OpenGL higher than 2.1 on OS X.
Upvotes: -1