fix z-buffer issues on x11/mesa