EGL_ANDROID_framebuffer_target#

Supported Hardware#

Series6, Series6XE, Series6XT

Valid APIs#

EGL 1.4

Descriptions#

Android supports a number of different ANativeWindow implementations that can be used to create an EGLSurface. One implementation, which is used to send the result of performing window composition to a display, may have some device-specific restrictions. Because of this, some EGLConfigs may be incompatible with these ANativeWindows. This extension introduces a new boolean EGLConfig attribute that indicates whether the EGLConfig supports rendering to an ANativeWindow for which the buffers are passed to the HWComposer HAL as a framebuffer target layer.

Note#

This extension is written against the wording of the EGL 1.4 Specification

Example#

// Set up the config attributes, specifying that we want a config which
// supports rendering to an ANativeWindow for which the buffers are passed
// to the HWComposer HAL as a framebuffer target layer.
EGLint configAttribs[] =
{
    EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
    EGL_RENDERABLE_TYPE , EGL_OPENGL_ES2_BIT,
    EGL_FRAMEBUFFER_TARGET_ANDROID, EGL_TRUE,
    EGL_NONE
};
// Choose an appropriate configuration - just get the first available one that matches in this case
EGLint iConfigs;
EGLConfig eglConfig;
eglChooseConfig(eglDisplay, configAttribs, &eglConfig, 1, &iConfigs);
//the buffer will be passed to the HWComposer HAL as a framebuffer target layer
eglSurface = eglCreateWindowSurface(eglDisplay, eglConfig, (EGLNativeWindowType)nativeWindow, NULL);