Give A directFB surface to EGL

刘涛 <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <[email protected]>
Hi
   I‘m trying to give a directFB surface to eglCreateWindowSurface(), like below:
    //1 create Directfb Surface
    DFBDisplayLayerConfig dlc;
    DFBSurfaceDescription dsc;
    DFBWindowDescription dsc_w;
    DirectFBInit(0, NULL);
    DirectFBCreate(&_pDFB);
    _pDFB->SetCooperativeLevel(_pDFB, DFSCL_FULLSCREEN);
    memset(&dsc, 0, sizeof(dsc));
    dsc.flags  = (DFBSurfaceDescriptionFlags)(DSDESC_CAPS);
    dsc.caps   = (DFBSurfaceCapabilities)(DSCAPS_PRIMARY | DSCAPS_DOUBLE|DSCAPS_GL);
    DFBCHECK(_pDFB->CreateSurface(_pDFB, &dsc, &_pDFB_surface));

    //2 create egl surface
    EGLDisplay eglDisplay = EGL_NO_DISPLAY;
    EGLint iMajorVersion, iMinorVersion;
     EGLint configAttribs[] =
    {
        EGL_RED_SIZE,          8,
        EGL_GREEN_SIZE,      8,
        EGL_BLUE_SIZE,          8,
        EGL_ALPHA_SIZE,      8,
        EGL_DEPTH_SIZE,      24,
        EGL_STENCIL_SIZE,      8,
        EGL_SAMPLES,          0,
        EGL_SURFACE_TYPE,     EGL_WINDOW_BIT,
        EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
        EGL_NONE
    };
    EGLConfig  eglConfig  = 0;
    EGLint iConfigs = 0;

    eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    eglInitialize(eglDisplay, &iMajorVersion, &iMinorVersion);
    eglBindAPI(EGL_OPENGL_ES_API);
    eglChooseConfig(eglDisplay, configAttribs, &eglConfig, 1, &iConfigs);
    eglSurface = eglCreateWindowSurface(eglDisplay, eglConfig, (EGLNativeWindowType)_pDFB_surface, NULL);

   But it failed and got 0x3003 error code.
    Any idea about that? 
Env:
    Ubuntu 14..04.3, Mesa-10.1.3, DirectFB-1.7.6(use system x11)

_______________________________________________
mesa-users mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.