Rotate display 180 degrees (Widgets/EGLFS)
-
Our project is using Qt5 Widgets on an embedded Linux platform, with EGLFS for rendering. We require the display to be installed in the system upside down, and we need to rotate the graphics 180 degrees to support this.
I've found "this post":http://qt-project.org/forums/viewthread/23393, which eventually leads to "this bug report":https://bugreports.qt-project.org/browse/QTBUG-39959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel . In the bug report is a very short discussion of how to accomplish this rotation in Qt 5.2, but also as mentioned in the bug report, Qt 5.3 has changed that part of the code significantly.
I don't know a thing about OpenGL, and I'm at a loss on how to resolve this.
Can someone make a suggestion, point me in the right direction, or (best option :) ) have a solution already?
I'm also open to other options. I'm currently waiting for a response from Digia on whether they may be of assistance even though we're using the open source version of Qt.
Thanks
-
I just tried your changes, and I get a display that is flipped horizontally, not rotated 180. I'm playing with the code now to see if I can figure it out.
EDIT: Might be my mistake. I had to manually modify the code because I couldn't directly apply the patch to 5.3.1. I might have changed the wrong line (the QOpenGLTextureBlitter::OriginBottomLeft part).
-
It was definately my mistake. The screen did properly rotate after I fixed that. I'm surprised that I didn't have to rotate the resistive touch sense 180 as well (which I know can be done with an environment variable) - it just worked!
The mouse not being rotate is a bit odd, but this is a non-issue in our application.
Laszlo, thank you!