Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: glutCreateWindow()

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2011
    Posts
    3

    glutCreateWindow()

    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?

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,882

    Re: glutCreateWindow()

    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 );

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2011
    Posts
    3

    Re: glutCreateWindow()

    I am calling glutInit(), and I tried the code you said. It still doesn't work.

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Oct 2009
    Posts
    595

    Re: glutCreateWindow()

    I had a problem when I called glutCreateWindow() with a NULL pointer for the name once.

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2011
    Posts
    3

    Re: glutCreateWindow()

    I didn't. It had a name.

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •