This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MALI-T820 eglCreatePixmapSurface()

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?

Parents Reply Children