Further drawing using EGL_BITMAP_POINTER_KHR from eglQuerySurface


#1

I managed to draw the surface before, but now i need to lock it, and draw using a pointer to the virtual memory obtained using eglQuerySurface with EGL_BITMAP_POINTER_KHR as an attribute.
I was able to get the pointer to virtual memory, but the old drawing mechanism, obviously, is not working anymore.

Any suggestions ?


#2

Your question is not clear. There are a couple of variables to consider. If your platform is 64 bit - you may need to use the 64 bit eglQuerySurface64. See https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_lock_surface3.txt. If your platform is EGL 1.5, the lock and unlock have been merged, so now its eglLockSurface and eglUnlockSurface - no “KHR”. Note the EGL_BITMAP_PITCH between each row of pixels to get read and write correct.