Menu

#229 ERROR: No display callback registered for window

None
closed-invalid
nobody
None
5
2015-09-16
2015-09-16
No

Freeglut crashes on displaying a window. The code is extremely simple.

glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
glutCreateWindow("OpenGL First Window");
glutMainLoop();

The error occurs on the last line. More specifically, in fg_main.c on lines 410-411:
if (!FETCH_WCB(*window, Display))
fgError ( "ERROR: No display callback registered for window %d\n", window->ID );

Discussion

  • Diederick C. Niehorster

    • status: open --> closed-invalid
    • Group: -->
     
  • Diederick C. Niehorster

    Hi Andrija,

    As the error says, it is an error to run the mainloop when you have
    windows without a display callback. Call glutDisplayFunc to set one.

    Best,
    Dee

     
  • Diederick C. Niehorster

    Hi Andrija,

    As the error says, it is an error to run the mainloop when you have
    windows without a display callback. Call glutDisplayFunc to set one.

    Best,
    Dee

     

Log in to post a comment.

MongoDB Logo MongoDB