protected int getNumSamplesToUse() {

        int samples = 0;

        if (settings.getSamples() > 1) {
            samples = settings.getSamples();
            final int supportedSamples = determineMaxSamples();
            if (supportedSamples < samples) {
                logger.log(Level.WARNING, "Couldn't satisfy antialiasing samples requirement: x{0}. " +
                        "Video hardware only supports: x{1}", APIUtil.toArray(samples, supportedSamples));
                samples = supportedSamples;
            }
        }

        return samples;
    }
Accesses the listener that receives events related to this context.

@return the pre-existing instance
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglContext.java