upstream imports
Default OpenGL error reporting to on
fix remaining legacy stuff