Handle display rotation in software openGL case