The visual/context handling for menus is still rather obscure, though...
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@668
7f0cb862-5218-0410-a997-
914c9d46530a
(285) X11 only: Free XVisualInfo structures when they are not needed
anymore, fixing a space leak. Not perfect for menus yet...
+
+(286) X11 only: Destroy the global menu rendering context when
+deinitializing. The visual/context handling for menus is still rather
+obscure, though...
/* If there was a menu created, destroy the rendering context */
if( fgStructure.MenuContext )
{
+#if TARGET_HOST_UNIX_X11
+ /* Note that the MVisualInfo is not owned by the MenuContext! */
+ glXDestroyContext( fgDisplay.Display, fgStructure.MenuContext->MContext );
+#endif
free( fgStructure.MenuContext );
fgStructure.MenuContext = NULL;
}