From 0c138d5410ed32bdeef22052b57f1bcecf6b5d4f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 8 Oct 2011 03:19:41 +0200 Subject: Generalize sample extension in GLCapabilities*, currently NV_coverage_sample is respected in EGL --- .../media/opengl/GLCapabilitiesImmutable.java | 34 +++++++++++++++------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java') diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java b/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java index b91ceae7a..5f8795edc 100644 --- a/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java +++ b/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java @@ -37,6 +37,17 @@ import javax.media.nativewindow.CapabilitiesImmutable; * @see javax.media.nativewindow.CapabilitiesImmutable */ public interface GLCapabilitiesImmutable extends CapabilitiesImmutable { + /** + * One of the platform's default sample extension + * EGL.EGL_SAMPLES, GLX.GLX_SAMPLES, WGLExt.WGL_SAMPLES_ARB + * if available, or any other known fallback one, ie EGLExt.EGL_COVERAGE_SAMPLES_NV + */ + public static final String DEFAULT_SAMPLE_EXTENSION = "default" ; + + /** + * Returns the GL profile you desire or used by the drawable. + */ + GLProfile getGLProfile(); /** * Returns the number of bits requested for the accumulation @@ -81,14 +92,22 @@ public interface GLCapabilitiesImmutable extends CapabilitiesImmutable { boolean getDoubleBuffered(); /** - * Returns the GL profile you desire or used by the drawable. + * Indicates whether hardware acceleration is enabled. */ - GLProfile getGLProfile(); + boolean getHardwareAccelerated(); /** - * Indicates whether hardware acceleration is enabled. + * Returns the used extension for full-scene antialiasing + * (FSAA), default is {@link #DEFAULT_SAMPLE_EXTENSION}. */ - boolean getHardwareAccelerated(); + String getSampleExtension(); + + /** + * Returns whether sample buffers for full-scene antialiasing + * (FSAA) should be allocated for this drawable. Defaults to + * false. + */ + boolean getSampleBuffers(); /** * Returns the number of sample buffers to be allocated if sample @@ -114,13 +133,6 @@ public interface GLCapabilitiesImmutable extends CapabilitiesImmutable { */ boolean getPbufferRenderToTextureRectangle(); - /** - * Returns whether sample buffers for full-scene antialiasing - * (FSAA) should be allocated for this drawable. Defaults to - * false. - */ - boolean getSampleBuffers(); - /** * Returns the number of bits requested for the stencil buffer. */ -- cgit v1.2.3