View Full Version : glutCreateWindow()

01-01-2011, 11:58 PM
The programs segfault when they get to glutCreateWindow(). This happens with the example programs, and with one I started on on another computer.

After commenting that out, it crashes on glutMainLoop(), which is the last function.

Any idea what I can do to fix it?

Dark Photon
01-02-2011, 02:40 PM
Check that you are calling glutInit( & argc, argv ).

If you are using an old, old glut, ensure that you are passing at least one argument to it via argc/argv. For instance:

int argc = 1;
char *name = "foo";
glutInit( &argc, &name );

01-02-2011, 07:30 PM
I am calling glutInit(), and I tried the code you said. It still doesn't work.

01-04-2011, 05:55 PM
I had a problem when I called glutCreateWindow() with a NULL pointer for the name once.

01-10-2011, 11:11 PM
I didn't. It had a name.

Is there any alternative to glutCreateWindow()? Should I just try a different toolkit?