View Full Version : Display Rotation and OpenGL

03-06-2002, 03:00 PM
Sorry if this is the wrong place to post this...

I have a singleboard development computer I am playing with that has an S3 Twister graphics adapter (a marriage of the Via chipset and the Pro Savage graphics engine.)

I am running an openGL application on the unit, and it runs fine in landscape mode, but when I rotate the screen orientation to portrait (using the native S3 drivers or the Pivot software), the graphics will not display properly.

Do I need a custom driver to handle the translation from landscape to portrait orientation? Or what?

Thanks for your help.

03-06-2002, 03:45 PM
If portrait mode means physically turning the display 90 left or right, you need
1) a way to detect that the display has been turned (no idea about that one)
2) adjust your viewport accordingly, ie swap x and y values
3) you may need to rotate your scene 90 around the z axis before drawing (not sure if the gfx chip handles this one automatically http://www.opengl.org/discussion_boards/ubb/confused.gif )

[This message has been edited by zeckensack (edited 03-06-2002).]