Hi All,
Could anyone point me to some sample application which uses the glTexDirectVIVMap()? I am trying to use it for camera capture and display application using V4L2 capture/X11/GLES2.0 APIs but it is not working. While I could manage to make it work with glTexDirectVIV() but it also required to do memcpy() which eventually increases the CPU load. So I think I can avoid the CPU load by using glTexDirectVIVMap() but not sure why it is not working.
Below is the code I am trying to use:
unsigned int physical = ~0U;
buffers[i].length = buf.length;
buffers[i].offset = buf.m.offset;
buffers[i].start = mmap (NULL ,buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, *fd, buf.m.offset);
(*pFNglTexDirectVIVMap)(GL_TEXTURE_2D, width, height, GL_VIV_YUY2, (GLvoid**) &buffers[buf.index].start, &physical);
(*pFNglTexDirectInvalidateVIV)(GL_TEXTURE_2D);
Am I doing anything wrong or missing something here? Does glTexDirectVIVMap()works with mmaped memory?
Thanks in advance.
Regards,
Vikas