Hi
In imx6, vivante has provided the graphics driver and implemented few EGL extension/wrapper files in vivante.h file.
For creating display and window, custom functions fbcreatedisplay and fbcreatewindow are used. When we create using these functions, the surface created seem to be bind to /dev/fb0.
We need to find a way to bind a surface to a different framebuffer like fb1, fb2 etc.
In imx53 and also in many other general implementations, eglcreatewindowsurface is used for the same as below:
eglsurface = eglCreateWindowSurface(egldisplay, eglconfig, open("/dev/fb0",
O_RDWR), NULL);
But in imx6 we find that this call though it does not give any error does not have any effect or any visual output for any framebuffer (even for fb0).
So how do we bind a particular surface to a framebuffer using EGL APIs or vivante APIs?
Thanks,
Ashok
已解决! 转到解答。
With MX6 selection of the framebuffer device bound to EGL is done as follows:
EGLNativeDisplayType native_display = fbGetDisplayByIndex(fbnum); // fbnum is an integer for /dev/fb1 fbnum = 1.
EGLNativeWindowType native_window = fbCreateWindow(native_display, 0, 0, 0, 0);
EGLDisplay egldisplayGL = eglGetDisplay(native_display);
eglInitialize(egldisplayGL, NULL, NULL);
...
Philip
With MX6 selection of the framebuffer device bound to EGL is done as follows:
EGLNativeDisplayType native_display = fbGetDisplayByIndex(fbnum); // fbnum is an integer for /dev/fb1 fbnum = 1.
EGLNativeWindowType native_window = fbCreateWindow(native_display, 0, 0, 0, 0);
EGLDisplay egldisplayGL = eglGetDisplay(native_display);
eglInitialize(egldisplayGL, NULL, NULL);
...
Philip
Hello Philip,
Sorry to bother you. I'm trying to follow your guideline about initializing EGL display using framebuffer:
EGLNativeDisplayType native_display = fbGetDisplayByIndex(fbnum);
the return parameter is always NULL for both 0 and 1 fb numbers. I've got /dev/fb0 and /dev/fb1
Could you help please what should i check in this case.
Thanks
Regards,
Konstantyn
Hi,
Sorry to dig an older thread.
I am trying to bind /dev/fb1 to EGL. so, i am replacing the fbnum parameter with "1". In my device /dev/fb1 is used as overlay framebuffer.when, i am running the sample, no graphics is displayed on the screen unlike the case with fbnum as "0".
Kindly help me with this.
With Regards,
Sudlin