@Override
  protected final GLDrawableImpl createOffscreenDrawableImpl(NativeSurface target) {
    if (target == null) {
      throw new IllegalArgumentException("Null target");
    }
    AbstractGraphicsConfiguration config = target.getGraphicsConfiguration();
    GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
    if (!caps.isPBuffer()) {
      return new X11PixmapGLXDrawable(this, target);
    }

    // PBuffer GLDrawable Creation
    GLDrawableImpl pbufferDrawable;
    AbstractGraphicsDevice device = config.getScreen().getDevice();

    /**
     * Due to the ATI Bug https://bugzilla.mozilla.org/show_bug.cgi?id=486277, we need to have a
     * context current on the same Display to create a PBuffer. The dummy context shall also use the
     * same Display, since switching Display in this regard is another ATI bug.
     */
    SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
    if (null != sr && sr.isGLXVendorATI() && null == GLContext.getCurrent()) {
      sr.getContext().makeCurrent();
      try {
        pbufferDrawable = new X11PbufferGLXDrawable(this, target);
      } finally {
        sr.getContext().release();
      }
    } else {
      pbufferDrawable = new X11PbufferGLXDrawable(this, target);
    }
    return pbufferDrawable;
  }
 public final boolean isGLXMultisampleAvailable(AbstractGraphicsDevice device) {
   if (null != device) {
     SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
     if (null != sr) {
       return sr.isGLXMultisampleAvailable();
     }
   }
   return false;
 }
 @Override
 public final boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp) {
   if (null == device) {
     SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(defaultDevice);
     if (null != sr) {
       device = sr.getDevice();
     }
   }
   return isGLXVersionGreaterEqualOneThree(device);
 }
 public final VersionNumber getGLXVersionNumber(AbstractGraphicsDevice device) {
   if (null != device) {
     SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
     if (null != sr) {
       return sr.getGLXVersion();
     }
     if (device instanceof X11GraphicsDevice) {
       return GLXUtil.getGLXServerVersionNumber((X11GraphicsDevice) device);
     }
   }
   return null;
 }
 public final boolean isGLXVersionGreaterEqualOneThree(AbstractGraphicsDevice device) {
   if (null != device) {
     SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
     if (null != sr) {
       return sr.isGLXVersionGreaterEqualOneThree();
     }
     if (device instanceof X11GraphicsDevice) {
       final VersionNumber glXServerVersion =
           GLXUtil.getGLXServerVersionNumber((X11GraphicsDevice) device);
       return glXServerVersion.compareTo(versionOneThree) >= 0;
     }
   }
   return false;
 }
 @Override
 protected final SharedResource getOrCreateSharedResourceImpl(AbstractGraphicsDevice device) {
   return (SharedResource) sharedResourceRunner.getOrCreateShared(device);
 }
 @Override
 protected final Thread getSharedResourceThread() {
   return sharedResourceRunner.start();
 }