Re: XForms: Destroy a GL window

From: spl@eggshell.ucsd.edu
Date: Wed Jun 27 2001 - 10:51:38 EDT

  • Next message: Michal Szymanski: "Re: XForms: Shift+Mouse on a button - possible?"

    # To subscribers of the xforms list from spl@eggshell.ucsd.edu :

    > A call to fl_winclose does not seem to be sufficient to close AND destroy
    > a window opened with fl_glwncreate (i.e. a GL win).
    >
    > Actually, fl_winclose does not free the whole memory allocated by
    > glwincreate - so that successive (open/close) create a kind of memory
    > leak.
    >
    > Is there a specific routine in XFORMS to destroy GL wins ?

    The only extra items created are the GLXContext and a Colormap.

    You should destroy the GLXContext with the OpenGL call
    glXDestroyContext().

    The Colormap may be destroyed with XFreeColormap():

            XWindowAttributes attrs;

            XGetWindowAttributes( fl_get_display(), w, &attrs );
            XFreeColormap( fl_get_display(), attrs.colormap );

                                                            spl

                                  
    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Wed Jun 27 2001 - 10:57:53 EDT