When the display hardware is physically rotated 90 degrees, your graphics can still be rendered with the correct side up. Where is this rotation accomplished? I can imagine a few possibilities:

A) The code for every low-level graphics primitive contains something to converts its arguments, like

if (portrait) {

(or perhaps multiplying every coordinate with a matrix)

B) The part of the graphics card that continuously scans its memory to create a video signal reads the data in a different order.

C) The monitor paints the received data column by column instead of row by row

A and B sounds like they would be inefficient and C means that it would only work on monitors that has special hardware-support for rotation. Which one is it?


1 Answer 1


On typical GPUs today it's option B: monitor rotation is done by the video output hardware ("display engine") during scan-out. In addition to rotating/flipping, the display engine can also scale the image within certain limits, do simple color/gamma correction, and even composite multiple image layers ("planes") together, all dynamically during scan-out.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.