I am trying to setup window-less OpenGL rendering. I am following these instructions for "Offscreen rendering only."
The code fails right here:
/* get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
glXChooseFBConfig
fails to set or retrieve a FBConfig.
I should mention that I am ssh'ing into an AWS ubuntu 12.04 machine without the -X
option (should I?) I also have a VNC server running that I'm tunneling into through ssh. I have tried the accepted solution to this question, namely changing the DISPLAY
env variable, but that still doesn't work:
$ export DISPLAY=:0
$ ./testglXContext
No protocol specified
No protocol specified
No protocol specified
No protocol specified
Failed to open display
$
What should I do?