I have been experimenting with OpenGL recently, and I decided to take a screenshot of one of my fancy triangles with import, which is part of imagemagick. However, on two different computers, one running LXDE on an Intel processor with integrated graphics and the other using stock Ubuntu on an AMD Fusion processor, and the result was the same: scrot perfectly captures my entire screen, whereas import has problems with my OpenGL window but nothing else (by "problems", I either mean data from other windows showing up in the image, or the image showing the window as not displaying anything at all).
What is causing this? Why does scrot work perfectly fine with OpenGL, while import doesn't?