Use frameBufferResize in examples and add CheckGLErrors