![]() |
2010-05-10
, 20:02
|
Posts: 12 |
Thanked: 13 times |
Joined on Feb 2010
|
#2
|
The Following User Says Thank You to rivierakid For This Useful Post: | ||
![]() |
2010-05-10
, 21:31
|
Posts: 252 |
Thanked: 252 times |
Joined on Nov 2009
|
#3
|
![]() |
2010-05-12
, 10:03
|
|
Posts: 754 |
Thanked: 630 times |
Joined on Sep 2009
@ London
|
#4
|
![]() |
2010-05-12
, 12:59
|
Posts: 252 |
Thanked: 252 times |
Joined on Nov 2009
|
#5
|
Have you tried to run your QT app with
./myApp -graphicssystem opengl
I think this uses the hardware acceleration but last I heard it was still experimental.
Let us know how it performs...
The Following User Says Thank You to dragly For This Useful Post: | ||
![]() |
2010-05-12
, 13:13
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#6
|
The Following User Says Thank You to Joorin For This Useful Post: | ||
![]() |
2010-05-12
, 13:54
|
Posts: 252 |
Thanked: 252 times |
Joined on Nov 2009
|
#7
|
If the reason for a weird behaviour moves around if you change your code, the reason most often IS your own code.
Try to cut away as much as possible to get a minimal example that displays the behaviour. If creating such a minimal example proves difficult, there is even more reason to take a longer look at your own code.
![]() |
2010-05-12
, 14:07
|
Posts: 200 |
Thanked: 44 times |
Joined on Jan 2010
|
#8
|
![]() |
2010-05-12
, 14:15
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#9
|
Yes, that would be reasonable to think, but the strange thing is that the weird behaviour moves around even if I don't change anything. The latest benchmarks I did showed that the slowdown in the main loop moved to a lot of different places.
I could try to make a minimal example from this, but that would probably just be the hellogl_es2 example from Qt - which ran fine the last time i tried.
I removed the drawing of the objects in question, tested again, and suddenly the timewaster was the QPainter::beginNativePainting(). Then I ran the game a few more times without changing anything, and I realized that the timewasting functions changes for each time.
![]() |
2010-05-12
, 14:34
|
Posts: 252 |
Thanked: 252 times |
Joined on Nov 2009
|
#10
|
And when I say "a minimal example", I'm referring to taking your code and commenting out or removing bits to make sure you still get the problem. To compile some example from another source might be interesting (if you get the same problem) but says nothing about your code.
The Following User Says Thank You to dragly For This Useful Post: | ||
The error is directly connected to the QPainter class, as I have a button in my application to activate the QPainter drawing of rectangles (used for menus and windows). Also, if I comment out the drawRect functions, but leave everything else as-is, it runs smoothly. QPainter's drawText function does run smoothly, however.
Running the application in Ubuntu or on Windows does not show a performance hit at all (not even slightly), so this is strictly related to the Maemo device. The device is running the libqt4-maemo5-* libraries.
Do you guys happen to know how I could try to debug this? I'm kind of stuck between wondering if there is something wrong with my mobile or Qt's drawRect-function - or my own code, of course.
If you need to have a look at the source, you can check out the latest tarball for our project (a game) from our git repo:
http://github.com/dragly/loose_cannon/tarball/master
I've posted this over at QtCentre as well, but I didn't get too much response over there, so I'm reposting here.