I used gprof to profile my app, but i found nothing, becouse my app is multithreded. And I use minGW. So I can't profile my app.
I have main.cpp and 3 other classes. Worker is in itsown thread. In main-tread is my MainWindows and my OpenGLWidget. OpenGLWidget will be shown between 9 and 12 times in MainWindow. If is stop time in painGL using QTime:
void OpenGLWidget::paintGL()
{
endTime1= t1.elapsed();//rest of the time
t.start();
paint();//openGL code
endTime = t.elapsed(); //within paintGL
t1.start();
}
void OpenGLWidget::paintGL()
{
endTime1= t1.elapsed();//rest of the time
t.start();
paint();//openGL code
endTime = t.elapsed(); //within paintGL
t1.start();
}
To copy to clipboard, switch view to plain text mode
endTime ist always 0. But the endTime1 is between 40 and 160 ms(with 12 widgets ) or 40 and 120 ms (with 9 widgets). But i do nothing in the rest of time. If I execute the same binary on ATI I get expected time (40 ms) Because :
timer->start(40);
connect(timer,SIGNAL(timeout()),this,SLOT(updateGL()),Qt::DirectConnection);
QTimer *timer = new QTimer();
timer->start(40);
connect(timer,SIGNAL(timeout()),this,SLOT(updateGL()),Qt::DirectConnection);
To copy to clipboard, switch view to plain text mode
Use QT driver specific way to show an app?
thanks!
Bookmarks