PDA

View Full Version : problems updateing a glut menu



Andrew Davey
05-26-2004, 01:00 PM
Hey guys,

I have created a sub menu using glut and the right click. But i am trying to update the values of this menu. I cant for the life of me get this to work, the reason i want to do this is sometimes during the application i might create another object, this object when created should be added to the sub menu.

This is what i am trying:


glutSetWindow(sub_info);
callback_infoMenu();This seems to work, but in the console if get this: (i should point out i am also using sub windows, and each suvb window has a different menu attached)
[CODE]
GLUT: Warning in D:\Files\Final Year Project\code folders\Version 8\Version 8.5\
Debug\Version 8.5.exe: glutSetWindow attempted on bogus window.
GLUT: Warning in D:\Files\Final Year Project\code folders\Version 8\Version 8.5\
Debug\Version 8.5.exe: glutSetWindow attempted on bogus window.
Press any key to continue
[CODE]

I cant seem to sort this out.

Any help would be appreciated.

dvm
05-27-2004, 06:39 AM
To me it looks like the id (the integer assigned from glut) of sub_info is not right. Can you verify that when you call glutCreateSubWindow you get a good id and that in the call to glutSetWindow the value is still the same?
Maybe you can try
glutGetWindow(sub_info) to be sure you have a good value before you try to set it.