PDA

View Full Version : GLUI causes GL_ERROR 1282/GL_INVALID_OPERATION - Operation illegal in current state



cthulhu666
07-25-2002, 04:41 AM
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.


Thanks

Cthulhu

cthulhu666
07-26-2002, 12:01 AM
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 << "\n";
glui_window_openfile->close();
}

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

GLUI_EditText *openfilename
= glui_window_openfile->add_edittext("Filename:",
GLUI_EDITTEXT_TEXT,
filename,
1,
(GLUI_Update_CB)cb_openfile);
GLUI_Button *glui_open
= glui_window_openfile->add_button("Open",
1,
(GLUI_Update_CB)cb_openfile);
}

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

cthulhu666
07-26-2002, 12:10 AM
???

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.

cthulhu666
08-07-2002, 11:40 PM
Any1???

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

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

Thanks