What I would like is - render the contents to linux framebuffer located at /dev/fb0. Do you have any clues on this?
I have explored many forums, and also the code in the official MESA repo (/src/egl/opengles1/eglfbdev.c), but so far, I am out of luck.
Is there something I am missing? The problem I am getting is - I constantly receive EGL_NO_DISPLAY. The code looks as follows (simplified for better understanding):
Make sure you enumerate the display devices and choose the right one.
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT =
(PFNEGLQUERYDEVICESEXTPROC)
eglGetProcAddress(“eglQueryDevicesEXT”);
…
eglDpy = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT,
eglDevs[0], 0); // I think the index may differ from platforms
You have to use the pbuffer surface to swap with the display.
// Create the pbuffer surface
static const EGLint configAttribs[] = {
EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
…
};
static const EGLint pbufferAttribs[] = {
EGL_WIDTH, pbufferWidth,
EGL_HEIGHT, pbufferHeight,
EGL_NONE,
};
EGLSurface eglSurf = eglCreatePbufferSurface(eglDpy, eglCfg,
pbufferAttribs);
// Swap pbuffer surface with display
eglSwapBuffers(eglDpy, eglSurf);
I’m also a newby, the understanding may not correct though, but I hope this information could help a little bit