Beispiel #1
0
static pointer
glxSetup(pointer module, pointer opts, int *errmaj, int *errmin)
{
    static Bool setupDone = FALSE;
    pointer GLcore  = NULL;
#ifdef GLX_USE_SGI_SI
    char GLcoreName[] = "GL";
#else
    char GLcoreName[] = "GLcore";
#endif

    if (!setupDone) {
    	setupDone = TRUE;

    	GLcore = LoadSubModule(module, GLcoreName, NULL, NULL, NULL, NULL, 
			   errmaj, errmin);
    	if (!GLcore) {
	    if (errmaj) *errmaj = LDR_NOSUBENT;
    	} else {
	    LoaderReqSymLists(glcoreSymbols, NULL);
    	    LoadExtension(&GLXExt, FALSE);
    	    /* Wrap the init visuals routine in micmap.c */
    	    GlxWrapInitVisuals(&miInitVisualsProc);
    	    /* Make sure this gets wrapped each time InitVisualWrap is called */
    	    miHookInitVisuals(NULL, GlxWrapInitVisuals);
	}
    } else {
	if (errmaj) *errmaj = LDR_ONCEONLY;
    }
    /* Need a non-NULL return value to indicate success */
    return GLcore;
}
void
InitVisualWrap()
{
    miResetInitVisuals();
#ifdef GLXEXT
#ifndef __DARWIN__
    GlxWrapInitVisuals(&miInitVisualsProc);
#else
    DarwinGlxWrapInitVisuals(&miInitVisualsProc);
#endif
#endif
}
void DarwinGlxWrapInitVisuals(
    miInitVisualsProcPtr *procPtr)
{
    GlxWrapInitVisuals(procPtr);
}
Beispiel #4
0
void
DarwinGlxWrapInitVisuals(
    void *procPtr)
{
    GlxWrapInitVisuals(procPtr);
}