https://hgpu.org/?p=7974
Using OpenGL State History for Graphics Debugging