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

Getting EGL_BAD_DISPLAY while firing eglquerystring() from application

Hi Community,

I am building test suite for Open GL ES 2.0 with EGL support.When I run app ,i am getting above error while getting EGL extensions with API egl.querystring().

Anything I am missing here OR is it because of libMAli.so/libEGL.so/user-space-driver issue?

My platform is linux with x11 as window manager.

Let me know if you want more information

Thanks,

Vaibhav

Message was edited by: vaibhav

Parents
  • If I understand the problem correctly, :

    • you'd like to query the available EGL extensions before trying to call eglGetPlatformDisplayEXT
    • you need to call eglQueryString(EGLDisplay, EGLint) for that purpose
    • eglQueryString needs an initialised display to work correctly

    And therefore you have a circular dependencies problem.

    One basic way to check if eglGetPlatformDisplayEXT is available on some platforms is to use dlsym. Something akin to :

    EGLDisplay display;
    if (dlsym(NULL, "eglGetPlatformDisplayEXT")) {
      display = eglGetPlatformDisplayEXT(...);
      ...
    }
    else {
      display = eglGetDisplay(your_own_getNativeDisplay_procedure());
      ...
    }
    

    dlsym(NULL, "symbolName") will search for symbolName in the current program and all the shared libraries dependencies declared in the current program executable file.

Reply
  • If I understand the problem correctly, :

    • you'd like to query the available EGL extensions before trying to call eglGetPlatformDisplayEXT
    • you need to call eglQueryString(EGLDisplay, EGLint) for that purpose
    • eglQueryString needs an initialised display to work correctly

    And therefore you have a circular dependencies problem.

    One basic way to check if eglGetPlatformDisplayEXT is available on some platforms is to use dlsym. Something akin to :

    EGLDisplay display;
    if (dlsym(NULL, "eglGetPlatformDisplayEXT")) {
      display = eglGetPlatformDisplayEXT(...);
      ...
    }
    else {
      display = eglGetDisplay(your_own_getNativeDisplay_procedure());
      ...
    }
    

    dlsym(NULL, "symbolName") will search for symbolName in the current program and all the shared libraries dependencies declared in the current program executable file.

Children