I am attempting to create a surface with eglCreatePixmapSurface () using MALI-T 820, but I have failed.Opengl version uses 1.1.I'm trying to create surface with the code below,The return value of eglCreatePixmapSurface () becomes EGL_NO_SURFACE and fails.------------------------------- EGLint const attrib_list[] = { EGL_SURFACE_TYPE,EGL_PIXMAP_BIT, EGL_NONE }; ret = eglChooseConfig(disp, attrib_list, &cconfig, 1, &num_config); if (ret != EGL_TRUE){ fprintf(stderr,"get config failed...%d\n",ret); return EGL_NO_SURFACE; } struct fbdev_pixmap buffer_type; buffer_type.data = (unsigned short *)malloc(1000*1000) ; buffer_type.width = 1000; buffer_type.height = 1000; buffer_type.format = 1; buffer_type.bytes_per_pixel = 4; buffer_type.buffer_size = 32; buffer_type.red_size = 8; buffer_type.green_size = 8; buffer_type.blue_size = 8; buffer_type.alpha_size = 8; buffer_type.luminance_size = 0; surface = eglCreatePixmapSurface(disp, cconfig, (EGLNativePixmapType)(&buffer_type), NULL); if (surface == EGL_NO_SURFACE){ fprintf(stderr,"create surface failed...\n"); return EGL_NO_SURFACE; }-------------------------------The type of fbdev_pixmap to pass to eglCreatePixmapSurface () defines the following itself.-------------------------------typedef struct fbdev_pixmap{ unsigned int height; unsigned int width; unsigned int bytes_per_pixel; unsigned char buffer_size; unsigned char red_size; unsigned char green_size; unsigned char blue_size; unsigned char alpha_size; unsigned char luminance_size; fbdev_pixmap_flags flags; unsigned short *data; unsigned int format;} fbdev_pixmap;-------------------------------Is it wrong because fbdev_pixmap is specified incorrectly?
Also note that eglCreatePixmapSurface attrib_list and eglChooseConfig attrib_list follow the same syntax, but do not support the same attributes.
Unless you plan to use OpenVG, you can ignore eglCreatePixmapSurface attributes list and pass NULL, like you did in the first place.
Thanks for the reply Myy.I set NULL as the fourth argument of eglCreatePixmapSurface and tried setting up attrib_list that I mentioned, but I got EGL_BAD_MATCH.I will investigate the setting of attrib_list to hand to eglChooseConfig again.
Also, if you know the EGLNativePixmapType you pass to eglCreatePixmapSurface, please let us know the procedure necessary for setting the structure to be passed on by the user side.