~$ ps aux | grep X
AD\zpt+ 438 0.0 0.0 15960 940 pts/6 S+ 08:26 0:00 grep --color=auto X
root 1481 15.9 0.0 529488 56440 tty7 Ssl+ 9/29 11687:57 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
AD\zpt+ 11607 0.2 0.0 194444 46644 ? S 9/29 169:18 Xvnc4 :1 -desktop cq-yjy-192-168-10-17:1 (AD\zpt19) -auth /home/zpt19/.Xauthority -geometry 1800x1000 -depth 16 -rfbauth /home/zpt19/.vnc/passwd -rfbport 5901 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/onts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
AD\zpt+ 15097 0.0 0.0 22956 5576 ? S 11/15 0:00 Xvnc4 :5 -desktop cq-yjy-192-168-10-17:5 (AD\zpt25) -auth /home/zpt25/.Xauthority -geometry 1024x768 -depth 16 -rfbauth /home/zpt25/.vnc/passwd -rfbport 5905 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/onts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
root 18752 0.0 0.0 22956 2420 ? S 10/22 0:00 Xvnc4 :3 -desktop cq-yjy-192-168-10-17:3 (root) -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbapasswd -rfbport 5903 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dponts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
root 19159 0.0 0.0 150844 13120 ? S 10/22 0:14 Xvnc4 :4 -desktop cq-yjy-192-168-10-17:4 (root) -auth /root/.Xauthority -geometry 1900x1000 -depth 16 -rfbwait 30000 -rfb/passwd -rfbport 5904 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dfonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
AD\zpt+ 19841 0.0 0.0 22956 6680 ? S 11/15 0:00 Xvnc4 :6 -desktop cq-yjy-192-168-10-17:6 (AD\zpt25) -auth /home/zpt25/.Xauthority -geometry 1024x768 -depth 16 -rfbauth /home/zpt25/.vnc/passwd -rfbport 5906 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/onts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
AD\zpt+ 30719 0.0 0.0 112228 8528 ? S 10/14 0:01 Xvnc4 :2 -desktop cq-yjy-192-168-10-17:2 (AD\zpt19) -auth /home/zpt19/.Xauthority -geometry 1920x1080 -depth 16 -rfbauth /home/zpt19/.vnc/passwd -rfbport 5902 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usrfonts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
AD\zpt+ 31353 0.0 0.0 22956 7292 ? S 11/18 0:00 Xvnc4 :7 -desktop cq-yjy-192-168-10-17:7 (AD\zpt25) -auth /home/zpt25/.Xauthority -geometry 1024x768 -depth 16 -rfbauth /home/zpt25/.vnc/passwd -rfbport 5907 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/onts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
- Why can’t Box A (Windows) run your code?
Because Box A has poor hardware performance, the code can merely run in simple cases.
- Are you trying to run your app in a VMWare virtual machine on Box B?
Box B is an linux server installed as Ubuntu 16.04. it’s not a virtual machine, but doesn’t has screen.
I have tried your link, but the instructions seems too brief for me, is there much work to do for me to change the code frome glfw3 + glad to egl?
Anyway, when I test the egl example code, It gose wrong.
int main(int argc, char *argv[])
{
// 1. Initialize EGL
EGLDisplay eglDpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
*// **the above returns :EGL_NO_DISPLAY***
EGLint major, minor;
eglInitialize(eglDpy, &major, &minor);
// 2. Select an appropriate configuration
EGLint numConfigs;
EGLConfig eglCfg;
eglChooseConfig(eglDpy, configAttribs, &eglCfg, 1, &numConfigs);
// 3. Create a surface
EGLSurface eglSurf = eglCreatePbufferSurface(eglDpy, eglCfg,
pbufferAttribs);
// 4. Bind the API
eglBindAPI(EGL_OPENGL_API);
// 5. Create a context and make it current
EGLContext eglCtx = eglCreateContext(eglDpy, eglCfg, EGL_NO_CONTEXT, NULL);
// **and after the above code, eglGetError() != EGL_SUCCESS**
// **I think that means it can't correctly create the gl context.**
eglMakeCurrent(eglDpy, eglSurf, eglSurf, eglCtx);
// from now on use your OpenGL context
// 6. Terminate EGL when finished
eglTerminate(eglDpy);
return 0;
}
Then I tried the multiple GPUs example. This time the GL context create function doesn’t cause Error.
EGLDisplay eglDpy = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, eglDevs[0], 0);
but I can’t use the GL fuctions:
(my progect is originally based on glfw3 and glad )
gladLoadGL()
or
glfwInit()
gladLoadGL()
gladLoadGL() just returned error and glGetString(GL_VERSION) == NULL