Reset OpenGL error state before reading capability