I needed to create additional topic because I reached limit of 3 replies in this post…
Hi Omar,
I already wrote the code to render to the Pbuffer on the BBB, but I am still unable to initialize the display, with the error already mentioned above. The error stems from the eglGetDisplay((EGLNativeDisplayType)0)
call which is required? for creating a Pbuffer surface.
The order of my calls is like this:
g_helper.display = eglGetDisplay((EGLNativeDisplayType)0); // this causes the ERROR
if (eglInitialize(g_helper.display, &major, &minor) == 0)
ERR("Could not create display");
// choosing a config (with these parameters)
/*
static const EGLint config_attrs[] = {
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, 8,
EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_NONE
};
*/
if (eglBindAPI(EGL_OPENGL_ES_API) == 0)
ERR("Could not bind the API");
EGLint eglSurfaceAttibutes[] = {
EGL_WIDTH, width,
EGL_HEIGHT, height,
EGL_NONE
};
g_helper.surface = eglCreatePbufferSurface(g_helper.display, g_helper.config, eglSurfaceAttibutes);
As before I had troubles with creating the surface (and it was solved with the Pbuffer surfaces) the root cause of using an additional ghost dummy HDMI plug is because I am unable to create a display.