Question

I have been studying the Qt Quarterly article about QGraphicsScene and OpenGL for the purpose of using it in a project. I have already decided to use Qt, given its all-round excellence, but have gone down the road of implementing a class derived from QGLWidget, however I would then still need to implement the UI elements. Using techniques from the quoted article would mean I could also use Qt widgets for the UI as well, making the program dependent on Qt alone (and not CEGUI or similar).

Anyway I have been running the sample under a desktop Linux machine, which has an Core i7 and a fairly good Nvidia card and it runs well, however my on my 2010 MacBook Pro (Core i5 and Nvidia 330) it runs very poorly indeed, especially when interacting with it using the mouse.

Question: can anyone suggest ways of improving the performance of this sample? I'm no Qt expert but I think the poor response is due to calls to update() from within the mouse handling code coupled with the timed calls to update() at the end of the method itself. I think what is needed is a background thread to update the object movement and a timed but constant call to update().

Can anyone comment on this?

EDIT: I have already tried removing all calls to update(), apart from the timer reset, and it makes very little difference.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top