Rotating the mainWindow


My project is going to display on a screen monitor where it will be tilted vertically, in full screen. However, I have been building my sketch as followed (where the mainWindow with multiple layer of people will be displayed in the screen monitor vertically).

Hence, I would like to ask what is the best way to draw my mainWindow please? I have been thinking of the following methods:
1/ Rotate the whole mainWindow (in main.cpp? Is it possible?)
2/ Rotate every visual elements (imgs, videos) (Easy but a lot of adjustment to the existing code I have for the alignment)



No need to change your window or assets, you can rotate your OS in System Preferences > Displays.


Hi, thanks for your reply!
But what if I have 2 windows, where I want the mainWindow to be rotated by the other window to be displayed “normally” please?


Correct me if I’m missing some of the subtleties of your project, I might be missing the point. But can’t you just draw everything within a ofPushMatrix()/ofPopMatrix() then rotate/translate it to where you need it to be?

//rotate 90 deg counter-clockwise, but translate it to the left first 
//(or else the content will be "above" the viewable area)
ofTranslate(-contentWidth, 0);
ofRotate(90, 0, 0, 1);      

//everything you draw here...


I recommend doing all your dev work with the content as see in the picture you posted, but make sure you’re doing it at full resolution of the vertical screen, then scale it down to make it viewable in normal landscape orientation. Then when you’re ready to display it, remove the scale-down then add the code above to move it into vertical mode.

Thanks a lot!!!
But rather than ofTranslate(-contentWidth, 0);, ofTranslate(ofGetWidth,0) works for me cos I am drawing everything in (0,0);!!! :DDD