jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

How to use a MMAL buffer as GLES texture?

Sun Aug 27, 2017 10:02 pm

Looking through the "userspace" repository and the "hello_pi" source code examples, I can't find something that combines using MMAL to capture video from the camera, and then mapping that as a GLES texture.
The few examples of "video into textures" I can find use OpenIL, and hello_videocube uses video decoder data, not live camera data.

Is there a good example, or documentation, for how to take an OPAQUE frame out of the camera output, and use it as a texture in GLES?

ethanol100
Posts: 587
Joined: Wed Oct 02, 2013 12:28 pm

Re: How to use a MMAL buffer as GLES texture?

Sun Aug 27, 2017 10:17 pm

Hi, you can have a look at
RaspiTex.c which handles the mmal to egl things for raspistill.

jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Re: How to use a MMAL buffer as GLES texture?

Sun Aug 27, 2017 11:50 pm

Perfect; thanks! I've been working in RaspiVid a whole lot, and wasn't thinking to look in RaspiStill :-)

Return to “Camera board”