Errors with initialisation order of OpenGL classes