Hello all!
I develop a medical application for embeded system (with eglfs, AM3517 processor based). I need to create a QML scene containing raw OpenGL Item (for displaying real-time graph).
I found this example in Qt documentation: http://qt-project.org/doc/qt-5.1/qtquick/scenegraph-textureinsgnode.html
, and modify it for my application (Change TextureNode class for render some VBO into FBO ).
I also have many other QML files that contain various elements of the interface.
So.. then i run application with only openGL Item, i have 10% CPU usage:
main.qml
-
import QtQuick 2.0
-
import Graphics 1.0
-
Rectangle {
-
width: 800
-
height: 600
-
color: "Gray"
-
GraphItem{
-
x: 230; y: 180
-
width: 210
-
height: 160
-
}
-
}
Then i run application with openGL Item and more other QML elements, do not overlap OpenGL item, i have 50% CPU usage!!:
main.qml
-
import QtQuick 2.0
-
import Graphics 1.0
-
Rectangle {
-
width: 800
-
height: 600
-
color: "Gray"
-
GraphItem{
-
x: 230; y: 180
-
width: 210
-
height: 160
-
}
-
MyOtherItems{
-
// this contains many rectangles, texts and other
-
}
-
}
I conclude that Scene Graph Renderer render All items every time.
But i need render only OpenGL Item!
I found, that Qt Scene graph include alchoritm for partial scene update (qt-project.org/doc/qt-5.1/qtquick/qtquick-visualcanvas-scenegraph.html). Why this alghoritm not working for me?
My SGX driver version is 4.06.00.02.
My Qt version is 5.0.
My extra enviroment variables:
TSLIB_FBDEVICE=/dev/fb0
TSLIB_TSDEVICE=/dev/input/event1
TSLIB_CONFFILE=/etc/ts.conf
TSLIB_CALIBFILE=/etc/pointercal
TSLIB_CONSOLEDEVICE=none
QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
QT_QPA_EGLFS_WIDTH=800
QT_QPA_EGLFS_HEIGHT=600
QT_QPA_EGLFS_HIDECURSOR=1
QML_RENDER_TIMING=23
My /etc/powervr.ini file is:
[default]
WindowSystem=libpvrPVR2D_FRONTWSEGL.so
ParamBufferSize=33554432
Application output:
evdevtouch: Using device /dev/input/event1
min X: 0 max X: 0
min Y: 0 max Y: 0
min pressure: 0 max pressure: 1023
device name: TPS6507x Touchscreen
Protocol type A
QTsLibMouseHandler "tslib" ""
- Breakdown of frame time; sync: 370 ms render: 995 ms swap: 0 ms total: 1365 ms time since last frame: 1 ms
- Breakdown of frame time; sync: 3 ms render: 74 ms swap: 1 ms total: 78 ms time since last frame: 99 ms
- Breakdown of frame time; sync: 1 ms render: 68 ms swap: 0 ms total: 69 ms time since last frame: 87 ms
- Breakdown of frame time; sync: 3 ms render: 26 ms swap: 0 ms total: 29 ms time since last frame: 31 ms
- Breakdown of frame time; sync: 1 ms render: 23 ms swap: 1 ms total: 25 ms time since last frame: 26 ms
- Breakdown of frame time; sync: 0 ms render: 49 ms swap: 1 ms total: 50 ms time since last frame: 51 ms
- Breakdown of frame time; sync: 1 ms render: 48 ms swap: 0 ms total: 49 ms time since last frame: 51 ms
When i build this applications on the desktop, CPU usage is constant (10% for other cases).
What i deal whrong? How render every time ONLY OpenGL QSGNode? How tuning EGLFS system for this?