whats the currently most performant way to rotate the screen in a package? In the past i’ve used util.screen_transform(), but i remember that not being the most performant solution.
I remember something using gl.pushMatrix(), but i can’t get it to work
It actually is. The slow one is using the display_rotate option in config.txt. util.screen_transform should work fine.
If you want to manually do the rotation, a gl.translate(WIDTH, 0) followed by gl.rotate(90, 0, 0, 1) should do the trick. That first moves everything to the top right corner, then rotates 90 degrees clockwise around the axis pointing towards the screen.
Everything can be rotated that way, except for raw videos as they are rendered outside of the GL layer. So you’ll have to use the rotation arguments in they place call for that.