--- renderer_info.orig 2010-12-10 14:33:47.000000000 +0800 +++ renderer_info.c 2011-01-30 02:52:47.000000000 +0800 @@ -12,7 +12,7 @@ typedef EGLDisplay (*PFNEGLGETDISPLAYPROC)(EGLNativeDisplayType display_id); typedef EGLBoolean (*PFNEGLINITIALIZEPROC)(EGLDisplay dpy, EGLint *major, EGLint *minor); typedef EGLBoolean (*PFNEGLTERMINATEPROC)(EGLDisplay dpy); -typedef EGLBoolean (*PFNEGLGETCONFIGSPROC)(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); +typedef EGLBoolean (*PFNEGLCHOOSECONFIGPROC)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); typedef EGLSurface (*PFNEGLCREATEWINDOWSURFACEPROC)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list); typedef EGLBoolean (*PFNEGLDESTROYSURFACEPROC)(EGLDisplay dpy, EGLSurface surface); typedef EGLContext (*PFNEGLCREATECONTEXTPROC)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); @@ -22,7 +22,7 @@ PFNEGLGETDISPLAYPROC pfnEGLGetDisplay = NULL; PFNEGLINITIALIZEPROC pfnEGLInitialize = NULL; PFNEGLTERMINATEPROC pfnEGLTerminate = NULL; -PFNEGLGETCONFIGSPROC pfnEGLGetConfigs = NULL; +PFNEGLCHOOSECONFIGPROC pfnEGLChooseConfig = NULL; PFNEGLCREATEWINDOWSURFACEPROC pfnEGLCreateWindowSurface = NULL; PFNEGLDESTROYSURFACEPROC pfnEGLDestroySurface = NULL; PFNEGLCREATECONTEXTPROC pfnEGLCreateContext = NULL; @@ -75,7 +75,7 @@ return NULL; } - if (!(*pfnEGLGetConfigs)(egl_dpy, &config, num_configs, &num_configs) || num_configs < 1) { + if (!(*pfnEGLChooseConfig)(egl_dpy, NULL, &config, num_configs, &num_configs) || num_configs < 1) { printf("failed to get egl config\n"); return NULL; } @@ -145,14 +145,14 @@ const char *gl_renderer = NULL; const char *gles2_renderer = NULL; - gles2_handle = dlopen("/usr/lib/libGLESv2.so", RTLD_LOCAL|RTLD_LAZY); - egl_handle = dlopen("/usr/lib/libEGL.so", RTLD_LOCAL|RTLD_LAZY); + gles2_handle = dlopen("libGLESv2.so", RTLD_LOCAL|RTLD_LAZY); + egl_handle = dlopen("libEGL.so", RTLD_LOCAL|RTLD_LAZY); if (egl_handle && gles2_handle) { /* Resolve EGL APIs for create rendering context to get GL_RENDERER */ pfnEGLGetDisplay = dlsym(egl_handle, "eglGetDisplay"); pfnEGLInitialize = dlsym(egl_handle, "eglInitialize"); - pfnEGLGetConfigs = dlsym(egl_handle, "eglGetConfigs"); + pfnEGLChooseConfig = dlsym(egl_handle, "eglChooseConfig"); pfnEGLCreateContext = dlsym(egl_handle, "eglCreateContext"); pfnEGLCreateWindowSurface = dlsym(egl_handle, "eglCreateWindowSurface"); pfnEGLMakeCurrent = dlsym(egl_handle, "eglMakeCurrent"); @@ -181,7 +181,7 @@ printf("OpenGL ES2.0 Renderer: %s\n", gles2_renderer ? gles2_renderer : "Not Available"); /* Try to get the opengl renderer info if available */ - gl_handle = dlopen("/usr/lib/libGL.so", RTLD_LOCAL|RTLD_LAZY); + gl_handle = dlopen("libGL.so", RTLD_LOCAL|RTLD_LAZY); if (gl_handle) { /* Resolve GLX APIs needed for create rendering context */