I have finally found why the bccbgi demo program didn't work for me on X11, my X server was in 32 bits color mode. Putting it in 24 bit solved the problem.
So it seems that bgi programs don't work in 32 bits color modes, grx ones work without problems.