| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hello Estarose, The fix to your problem with glutChangeToMenuEntry involves changes in both your code and GLUT.
The changes to your code are minor. Basically, you need to call glutSetMenu and pass the id returned by your call to glutCreateMenu in your myMenuInit function. GLUT has a concept of a "current menu", and without calling glutSetMenu, the current menu was set to the last menu you created, which in this case was your top level menu. I tried this with the code you included in your original message and it worked. I moved the declaration: int sub1,sub2,sub3; up to the top in your globals and glutSetMenu(sub3); to handlealphamenu() and glutSetMenu(sub2); to handlecolormenu().
A workaround while you wait for the updated GLUT is to simply rebuild your whole menu from scratch each time you want to change an entry. For example, create a function similar to your current myMenuInit, but give it some parameters specifying which menu item in each submenu is selected, and call that function from the menu selection callbacks. |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.