GLUI causes GL_ERROR 1282/GL_INVALID_OPERATION - Operation illegal in current state

Hi every1

I’m new to openGL/GLUT/GLUI so please bear with me.

I’m writing a simple openGL program with a GLUI subwindow containing a button. The buttons callback function creates a new GLUI window with a EditText box (simple open file dialog w/o filebrowsing). And finally the EditText box’s CB closes the (new) window, but it also causes a GL_INVALID_OPERATION.

I have an animation running in the main GL window.

Can any1 tell me what I’m doing wrong or if I have discovered a bug in GLUI?

I’m trying to write the program as platform independent as possible, but right now I writing/testing on WinXP with cygwin/gcc.

AFAIK I’m using the newest versions of GL/GLUT/GLUI (1.3.1 / 3.7.2 / 2.01).

Let me know and I’ll post any other info that might be helpfull.



Come on… some1 gotta be able to help me put here.

I’ll throw you a bone, here’s a snip from the code (namely the callback functions in question):

void cb_openfile() {
  cout << "Opening file: " << filename << "

void cb_openfile_window() {
    = GLUI_Master.create_glui("Open file");

  GLUI_EditText *openfilename
    = glui_window_openfile->add_edittext("Filename:",
  GLUI_Button *glui_open
    = glui_window_openfile->add_button("Open",

[This message has been edited by cthulhu666 (edited 07-26-2002).]


Why on earth does the UBB Code “CODE” insist on writing the first functions with a smaller font?

Oh well, you can still read it.


Someone’s gotta be able to help me out here.

Just a hint or a pointer where to look would be highly appreciated.