long[] visInfo = new long[1]; int visID = chooseOglVisual(display, screen, attrList, visInfo);
long[] fbConfig = new long[1]; int visID = chooseOglVisual(display, screen, attrList, fbConfig);
      getBestConfiguration(GraphicsConfigTemplate3D template,                           GraphicsConfiguration[] gc) {        X11GraphicsDevice gd =            (X11GraphicsDevice)((X11GraphicsConfig)gc[0]).getDevice();	NativeScreenInfo nativeScreenInfo = new NativeScreenInfo(gd);	long display = nativeScreenInfo.getDisplay();	int screen = nativeScreenInfo.getScreen();	if (debug) {	    System.out.println("  NativeConfigTemplate3D: using device " + gd);	    System.out.println("    display " + display + " screen " + screen);	    System.out.println("    configuration count: " + gc.length);	    for (int i = 0 ; i < gc.length ; i++) {		System.out.println("      visual id at index " + i + ": " + 				   ((X11GraphicsConfig)gc[i]).getVisual());	    }	}	Rectangle bounds = gc[0].getBounds();	if ((bounds.x != 0 || bounds.y != 0) &&	    (! VirtualUniverse.mc.xineramaDisabled)) {	    // Xinerama is being used.  The screen needs to be set to 0 since	    // glxChooseVisual will not return a valid visual otherwise.	    screen = 0;	    if (debug) {		System.out.println("  Non-primary Xinerama screen:");		System.out.println("    bounds = " + bounds);		System.out.println("    using screen 0 visual");	    }	}        int[] attrList;   // holds the list of attributes to be translated                          // for glxChooseVisual call        attrList = new int[NUM_ITEMS];        // assign template values to array        attrList[RED_SIZE] = template.getRedSize();        attrList[GREEN_SIZE] = template.getGreenSize();        attrList[BLUE_SIZE] = template.getBlueSize();        attrList[DEPTH_SIZE] = template.getDepthSize();        attrList[DOUBLEBUFFER] = template.getDoubleBuffer();        attrList[STEREO] = template.getStereo();        attrList[ANTIALIASING] = template.getSceneAntialiasing();	long[] visInfo = new long[1];        int visID = chooseOglVisual(display, screen, attrList, visInfo);	if (debug) {	    System.out.println("  chooseOglVisual() returns " + visID);	    System.out.println("  pointer to XVisualInfo is " + visInfo[0]);	    System.out.println();	}        if (visID == 0 || visInfo[0] == 0) {	    return null;  // no valid visual was found	}        // search list of graphics configurations for config        // with matching visualId        GraphicsConfiguration gc1 = null;        for (int i = 0; i < gc.length; i++)            if (((X11GraphicsConfig)gc[i]).getVisual() == visID) {                gc1 = gc[i];                break;            }	// To support disabling Solaris OpenGL Xinerama mode, we need to cache	// the pointer to the actual XVisualInfo that glXChooseVisual()	// returns, since this is not cached with X11GraphicsConfig and there	// are no public constructors to allow us to extend it.	synchronized (Canvas3D.visInfoTable) {	    if (Canvas3D.visInfoTable.get(gc1) == null)		Canvas3D.visInfoTable.put(gc1, new Long(visInfo[0]));	    else		freeVisual(visInfo[0]);	}        return gc1;    }