Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Nearly a week now, and I can't figure out what's wrong! Any pointers would be appreciated (pun intended)!

Ubuntu 12.04 x86_64
Mesa-8.0.4

./configure --enable-64-bit --enable-pic -enable-opengl --enable-gles2 --enable-xorg --enable-egl --enable-glu --with-x

(Also tried with the apt-get package of Mesa)

ls /usr/local/lib | grep EGL  
libEGL.so@  
libEGL.so.1@  
libEGL.so.1.0*  

When running the simple tutorial code

display = eglGetDisplay(EGL_DEFAULT_DISPLAY);  
EGLBoolean err = eglInitialize(display, NULL, NULL);

initialize fails and further functions return EGL_NOT_INITIALIZED.

share|improve this question
    
apt-get install libxcb-xfixes0-dev libxcb-dri2-0-dev helps building the Mesa. –  Vorac Nov 21 '12 at 14:33
add comment

1 Answer

Under an X desktop, you cannot use EGL_DEFAULT_DISPLAY. You must pass to eglGetDisplay() a pointer to a valid Xlib Display. For example:

EGLBoolean ok;

Display *xlib_dpy = XOpenDisplay(NULL);
if (!xlib_dpy)
  return;

EGLDisplay egl_dpy = eglGetDisplay(xlib_dpy);
if (!egl_dpy)
  return;

int major;
int minor;
ok = eglInitialize(egl_dpy, &major, &minor);
if (!ok)
  return;

if (10 * major + minor != 14) {
  /* EGL is too old; */
  return;
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.