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

Not able to get display(EGL_NO_DISPLAY) while running Application for OpenVG1.1 in ARM MALI-400 r5p1

Hi Community,

I am trying to run application for openVG1.1 on ARM MALI-400 r5p1.
I have compiled the libOpenEGL.so for X11 windowing system but it seems that It is not able to get the Display.

Environment:

-Linux

-X11

Code snippet:

int tkNewWindow(CT_AppRec *pMe, int x, int y, int width, int height ) 
{ 
    EGLint majorVersion, minorVersion; 

    pMe->native_display = XOpenDisplay(NULL); 
         printf("in tkNewWindow\n"); 
    pMe->native_window = XCreateSimpleWindow(pMe->native_display, RootWindow(pMe->native_display, DefaultScreen(pMe->native_display)), x, y, width, height, 2, WhitePixel(pMe->native_display,0), BlackPixel(pMe->native_display, 0)); 

    XMapWindow(pMe->native_display, pMe->native_window); 

    if ( !pMe->native_window ) { 
        FPRINTF(stderr, "%s", "Can't create windows.\n"); 
         printf("Cant create windows\n"); 
        return 0; 
    } 

    pMe->egl_display = eglGetDisplay(pMe->native_display); 

    if (!eglInitialize(pMe->egl_display, &majorVersion, &minorVersion)) { 
        FPRINTF(stderr, "%s", "eglInitialize failed.\n"); 
        XDestroyWindow(pMe->native_display, pMe->native_window); 
        XCloseDisplay(pMe->native_display); 
        return 0; 
    } 

    eglBindAPI(EGL_OPENVG_API); 
    return 1; 
} 

I am getting below error:

eglInitialize failed. at line: 17 and 19

.

Can anyone please suggest me how I can solve this issue?

Thanks,

DP

Parents Reply Children