Running on DM3730. I have an application that has video coming from an external source and displayed on an LCD, and also draws a semi-transparent graphical overlay over the video.
I'm currently using DMAI for the V4L2 Capture/Display video and just straight-up passing 32-bit-RGBA-formatted buffers to FBdev to draw the graphical overlay. With that setup, making the graphics transparent over the display video is simple. I just do something like this:
struct v4l2_framebuffer framebuffer;
if(ioctl(Display_getHandle(hDisplay), VIDIOC_G_FBUF, &framebuffer) == -1)
cout << "Error VIDIOC_G_FBUF" << endl;
else
{
if((framebuffer.capability & V4L2_FBUF_CAP_LOCAL_ALPHA) == 0)
cout << "Device does not support Alpha Blending." << endl;
framebuffer.flags &= ~V4L2_FBUF_FLAG_CHROMAKEY;
framebuffer.flags |= V4L2_FBUF_FLAG_LOCAL_ALPHA;
if(ioctl(Display_getHandle(hDisplay), VIDIOC_S_FBUF, &framebuffer) == -1)
cout << "Error setting Alpha Blending" << endl;
}
So that all works. Now fast forward and I'd like to start doing more fancy and dynamic things with the graphical overlay, so instead of drawing the buffers "by hand", I'd like to leverage OpenGL to draw my graphics. That works great as well, except that I cannot figure out how to make the OpenGL graphics overlay transparent to the DMAI video. Any idea what needs to be done to enable that?
For reference, I've attached my current EGL init (since I assume that's probably what needs to change)...
5148.eglinit.txt
Thanks,
Glenn Wainwright
Senior Software Engineer, Verathon Inc.