Weird, I tried exactly that with no success. I tried in Gnome and KDE (My Unity test was a while ago, maybe I did something different). All it does is go into a semi fullscreen, the same as clicking on the maximize button on the window control. I tried doing this in the graphicsExample and imageLoaderExample.
I'm running Ubuntu 15.10. Though the same happend on 15.04.