1

I have a program that uses OpenGL+glsl to do computation. Currently I'm using GLFW to create a context in a hidden window via:

glfwWindowHint(GLFW_VISIBLE, GL_FALSE);
window = glfwCreateWindow(1, 1,"", NULL, NULL);

This is working great for me if I run my program locally on my server at work with a fancy GPU.

When I try to log on to this server from home via SSH, I get segmentation faults. I've tried ssh -X and ssh -Y but this doesn't help. I'm also not even sure that would run the program using the server's GPU (would it?).

All I'd like to do is run the program as if I was there at the keyboard issuing it on a local terminal. There's no window or graphics to forward. Is this possible?

Would this be easier with an alternative context manager to GLFW? I actually want to use OpenGL for my problem since it is trivially re-formulated as a direct rendering task (i.e., as opposed to rewriting my program in cuda).

Alec Jacobson
  • 6,032
  • 5
  • 51
  • 88
  • 1
    I might have found a solution. If I issue `export DISPLAY=:0` after ssh'ing, things seem to work correctly. Is this to be expected? – Alec Jacobson Jun 03 '17 at 20:46
  • You don't really need to create any windows and / or use GLFW at all to render off-screen or perform computations. Just look up some tutorials on initializing open Gl from scratch and windowless rendering. – user7860670 Jun 03 '17 at 21:01
  • @VTT Really? That'd be great. But would seem to contradict this answer: https://stackoverflow.com/a/2902185/148668 – Alec Jacobson Jun 05 '17 at 09:49

0 Answers0