[XForms] Patch: GLCanvas context sharing support.

David Scriven davidwriter at yahoo.com
Fri May 14 14:33:57 EDT 2004


Jason, Maybe I'm being slow, but I don't see why we need
this patch -  can you give an example of how you would 
use it.


One can obtain the context of a canvas after you create
it:
    ....
    fl_add_glcanvas....
    ...
    fl_initialize
    ...
    GLXContext CanvasContext = NULL;
    CanvasContext = fl_get_glcanvas_context(form->canvas);
    if(CanvasContext == NULL)
    {
         ....aaargh - disaster !
    }

    and use it in calls to
     glXCopyContext.


> As far as the GL stuff, the problem was that this was removed from
> forms.h in 1.0.90 (it was there in 1.0):
>  
> #if defined(__GLX_glx_h__) || defined(GLX_H)
> #include <X11/glcanvas.h>
> #endif
> 

This definition doesn't always work - for example NVIDIA
defines its glx.h file differently, so you have to have

#if defined(__GLX_glx_h__) || defined(GLX_H) || defined(__glx_h__)

for glcanvas to work. Clearly not a good thing if we have to
alter the test to cover all the internal structures of various
vendor's glx.h files. 

DS

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca



More information about the Xforms mailing list