OpenGL program not work with X forwarding

Solution 1:

You need to set up remote rendering, or use a ssh client that supports to get pre-rendered windows.

$ export LIBGL_ALWAYS_INDIRECT=1   or use any nonzero value

On my machine Cygwin/X allows me to run both modes, while Xming only allows the remote rendering (on client). The application I developed also had trouble with not being allowed to use 24-bit mode, but it worked when color-depth was unspecified.