Has anyone used this extension successfully? The Khronos spec can be read here: NV_depth_nonlinear extension
I have successfully check the extension via EGL config choosing:
public class CustomEGLConfigChooser implements EGLConfigChooser {
private static final int EGL_DEPTH_ENCODING_NV = 0x30E2;
private static final int EGL_DEPTH_ENCODING_NONLINEAR_NV = 0x30E3;
private int[] mValue = new int[1];
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
// request configs
EGLConfig[] configs = egl.eglChooseConfig(...);
// ...
EGLConfig bestConfig = null;
for(EGLConfig config : configs){
// check for EGL_DEPTH_ENCODING_NV
egl.eglGetConfigAttrib(display, config, EGL_DEPTH_ENCODING_NV, 0);
int hasDepthNonLinear = findConfigAttrib(egl, display, config, EGL_DEPTH_ENCODING_NV, 0);
if(hasDepthNonLinear == EGL_DEPTH_ENCODING_NONLINEAR_NV) {
// what to do now ???...
}
}
return bestConfig;
}
private int findConfigAttrib (EGL10 egl, EGLDisplay display, EGLConfig config, int attribute, int defaultValue) {
if (egl.eglGetConfigAttrib(display, config, attribute, mValue)) {
return mValue[0];
}
return defaultValue;
}
}
But how do I use the non linear depth extension? Must I use:
glBindRenderbuffer(...);
glRenderbufferStorage(...);