I have a program that runs in X11 and uses GLX. After adding a key to toggle fullscreen mode at runtime, I noticed a strange problem: my models would disappear. After poking around a bit, I disabled blending and the models reappeared, but were all black. This indicates that the uniform buffer holding material parameters was clobbered and effectively replaced with zeroes. After some more debugging I isolated the problem to my set_video_mode function, which uses several XRandR calls to change the monitor configuration to one suitable for the requested fullscreen mode. Using the xrandr command-line utility to modify the monitor configuration while the program is running has the same effect.
Is this something I should have expected? Or is it a driver bug? I thought it’s the OpenGL implementation’s job to maintain validity of the context and all objects within it. Any idea why only that single, tiny uniform buffer gets clobbered and the much larger vertex and index buffers are left intact?
I have a GeForce GTX 660 with driver version 340.32 and X.org version 1.16.1.