Hello:
As we know, We can enable single-buffer attribute with egl like this:
const EGLint windowAttribs[] =
{
EGL_RENDER_BUFFER, EGL_SINGLE_BUFFER,
EGL_PROTECTED_CONTENT_EXT, isProtectedContent,
EGL_COLORSPACE, colorSpace,
EGL_NONE
};
eglCreateWindowSurface(display, config, gAppContext->modeContext->nativeWindow, windowAttribs);
eglMakeCurrent(display, surface, surface, context);
eglSurfaceAttrib(display, surface, EGL_RENDER_BUFFER, EGL_SINGLE_BUFFER);
eglSurfaceAttrib(display, surface, EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID, 1);
With the operation above, Traditional android triple or double buffer surface(ANatvieWindow
) will be replaced by single buffer.
Also i want to achieve this goal in vulkan, But i can’t find any similar vulkan API like egl.
Could anybody give some advice, Thanks .