summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java5
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java11
2 files changed, 16 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
index 8a423c6a8..42d911610 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
@@ -38,6 +38,7 @@ public class EGLGLCapabilities extends GLCapabilities {
final int eglcfgid;
final int renderableType;
int nativeVisualID;
+ boolean useNV_coverage_sample;
/** Comparing EGLConfig ID only */
public static class EglCfgIDComparator implements Comparator {
@@ -85,6 +86,7 @@ public class EGLGLCapabilities extends GLCapabilities {
" with EGL-RenderableType["+renderableTypeToString(null, renderableType)+"]");
}
this.renderableType = renderableType;
+ this.useNV_coverage_sample = false;
}
public Object cloneMutable() {
@@ -104,6 +106,8 @@ public class EGLGLCapabilities extends GLCapabilities {
final public int getRenderableType() { return renderableType; }
final public void setNativeVisualID(int vid) { nativeVisualID=vid; }
final public int getNativeVisualID() { return nativeVisualID; }
+ final public boolean getUseNV_coverage_sample() { return useNV_coverage_sample; }
+ final public void setUseNV_coverage_sample(boolean v) { useNV_coverage_sample=v; }
public static boolean isCompatible(GLProfile glp, int renderableType) {
if(null == glp) {
@@ -161,6 +165,7 @@ public class EGLGLCapabilities extends GLCapabilities {
sink.append("0x").append(Long.toHexString(eglcfgid)).append(": ");
sink.append("vid 0x").append(Integer.toHexString(nativeVisualID)).append(", ");
super.toString(sink);
+ sink.append(", nv-covrg ").append(getUseNV_coverage_sample());
sink.append(", [");
renderableTypeToString(sink, renderableType);
return sink.append("]");
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
index 14e67a2c1..5f241a1d0 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
@@ -217,6 +217,17 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
caps.setSampleBuffers(val.get(0)>0?true:false);
caps.setNumSamples(val.get(0));
}
+ if(!caps.getSampleBuffers()) {
+ // try NV_coverage_sample extension
+ if(EGL.eglGetConfigAttrib(display, config, EGLExt.EGL_COVERAGE_BUFFERS_NV, val)) {
+ if(val.get(0)>0 &&
+ EGL.eglGetConfigAttrib(display, config, EGLExt.EGL_COVERAGE_SAMPLES_NV, val)) {
+ caps.setUseNV_coverage_sample(true);
+ caps.setSampleBuffers(true);
+ caps.setNumSamples(val.get(0));
+ }
+ }
+ }
if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_TYPE, val)) {
caps.setBackgroundOpaque(val.get(0) != EGL.EGL_TRANSPARENT_RGB);
}