In my project I am using egl library to plot a 3D object to the
display and concurrently saving the image in a file or an area
of memory. I'm trying to use eglCopyBuffers() to copy a surface
to a pixmap in order to obtain the pixel value that are
displayed. I'm using an ARM MALI architecture and I would not
want to use X11 but writing directly to GNU/Linux framebuffer. I
have few questions:  1)In my method, I pass to eglCopyBuffers
function, as 'native_pixmap' parameter, an 'EGLNativePixmapType
native_pixmap= NULL'. Is it correct? If I try to allocate a
Pixmap (X11 dependent) before calling eglCopyBuffers the system
crashes. How should I declare the pixmap if I do not want to use
X11 libraries? In addition, if I do as above, eglCopyBuffers
returns an EGL_FALSE error, which means that the swapping of the
surface buffers fails.  2) Is there another simpler method to
obtain the image displayed in framebuffer? Should I directly
read data from /dev/fb0? I read about the method glReadPixel but
it is described as be