System: CentOS Linux release 7.2.1511 (Core)
Driver: NVIDIA-SMI 384.66
eglQueryDevicesEXT always get 0 devices.
[Code]
#define EGL_EGLEXT_PROTOTYPES
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <stdio.h>
int main()
{
EGLDisplay eglDpy;
static const int MAX_DEVICES = 4;
EGLDeviceEXT eglDevs[MAX_DEVICES];
EGLint numDevices;
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT =
(PFNEGLQUERYDEVICESEXTPROC)
eglGetProcAddress(“eglQueryDevicesEXT”);
eglQueryDevicesEXT(MAX_DEVICES, eglDevs, &numDevices);
printf(“Detected %d devices\n”, numDevices);
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT =
(PFNEGLGETPLATFORMDISPLAYEXTPROC)
eglGetProcAddress(“eglGetPlatformDisplayEXT”);
eglDpy = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT,
eglDevs[1], 0);
EGLint major, minor;
eglInitialize(eglDpy, &major, &minor);
// …