OpenGL: fix subpicture rendering