To render to an EGLDevice through stream
- Query EGL extensions using
eglGetProcAddress
. - Query available EGLDevices with
eglQueryDevicesEXT
. - Obtain an EGL display from the EGL device using
eglGetPlatformDisplayEXT
.This step creates an EGLDisplay that does not belong to any native platform.
- Initialize/setup EGL using
eglInitialize
. - Setup an EGLOutput. For detailed steps, see Setting Up the Display.
- Selecting an output:
- Can be done by enumerating all outputs and selecting a known index.
- Can be done by looking up an output associated with a native (e.g. DRM) screen handle.
- If necessary, initialize display settings using native interfaces
- Selecting an output:
- Direct rendering to an EGLOutput.
- Create an EGL stream using
eglCreateStreamKHR
. - Connect the output layer to the stream. Bind consumer end of stream to EGLOutput
window object using
eglStreamConsumerOutputEXT
.
- Create an EGL stream using
- Set buffer configurations by choosing an EGLConfig
- Create a stream producer surface to feed the stream using
eglCreateStreamProducerSurfaceKHR
. - Create an EGL context, make it current by binding it to the stream surface using
eglMakeCurrent
. - Post surface contents to the stream using
eglSwapBuffers
.