QOffscreenSurface through SSH
My application is using OpenGL to perform some operations in the kernel (for example, compute a matrix that depends on screen space connectivity). Therefore I need to have a OpenGL context which invokes my shader. Right now I'm doing all this through Qt3D as it's really to configure shaders, geometries and so on.
As it's an application for doing some experiments for my PhD, I want to be able to launch the experiments through SSH in a more powerful remote machine. The problem is that it uses OpenGL and when I try to create the window, it crashes (as expected)
I have read about QOffscreenSurface, but in my system it's just a hidden native window. To have a real screenless surface, I think I need to use egl.
My main problem is that when I try to run my app with the flag -platform eglfs, the system says "Could not open egl display".
Any idea of why is this happening?
Which OSs are on your remote and client machine? Both Linux? And you connect with
ssh -Y? Or Linux to Windows or Mac? Does your local machine have a GPU or even your remote machine?
You will have to be more specific about your situation with your question...
You are right, I missed a lot of information.
Both machines are linux machines (in fact, right now, while trying to make it work, they are the same machine). The host machine is a full desktop machine with GPU and the remote one may be a computer with GPU but not X11. As the remote machine may not have a X11 server, I'm not using -Y option for the SSH.
From the QOffscreenSurface:
Note: Some platforms may utilize a surfaceless context extension (for example EGL_KHR_surfaceless_context) when available. In this case there will be no underlying native surface. For the use cases of QOffscreenSurface (rendering to FBOs, texture upload) this is not a problem.
And from nvidia devblog:
That is where the problem is. If I understand correctly, if I use egl plugin (-platform eglfs), it would be possible to have a surfaceless context that doesn't need X11.
Am I right? And if I'm right, why I'm having that error? (Could not open egl display)
I'm not an expert on how graphics stack works on linux (X, egl, wayland, xcb...), so please, tell me how to do get the info you need for help.