protected PixelFormat acquirePixelFormat(boolean forPbuffer) {
        if (forPbuffer) {
            // Use 0 samples for pbuffer format, prevents
            // crashes on bad drivers
            if (pbufferFormat == null) {
                pbufferFormat =
                    new PixelFormat(
                        settings.getBitsPerPixel(),
                        settings.getAlphaBits(),
                        settings.getDepthBits(),
                        settings.getStencilBits(),
                        0, // samples
                        0,
                        0,
                        0,
                        settings.useStereo3D()
                    );
            }
            return pbufferFormat;
        } else {
            if (canvasFormat == null) {
                int samples = getNumSamplesToUse();
                canvasFormat =
                    new PixelFormat(
                        settings.getBitsPerPixel(),
                        settings.getAlphaBits(),
                        settings.getDepthBits(),
                        settings.getStencilBits(),
                        samples,
                        0,
                        0,
                        0,
                        settings.useStereo3D()
                    );
            }
            return canvasFormat;
        }
    }
It seems it is best to use one pixel format for all shared contexts.

@see <a href=
     "http://developer.apple.com/library/mac/#qa/qa1248/_index.html">http://developer.apple.com/library/mac/#qa/qa1248/_index.html</a>

@param forPbuffer true&rarr;zero samples, false&rarr;correct number of samples
@return a new instance
jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java