Opengl rendering loop
-
Greetings Qt Devs,
I'm using a QGraphicsView. I would like to add my own opengl to render the background.
I'm reimplementing drawBackground and using a QTimer on the update() slot.
Performance wise, is it the best approach ?
-
Sounds reasonable to me.
-
Performance wise, you mean, by FPS?
-
Yes in terms of FPS and 3d rendering.
-
Well, the best performance you will get if you don't use Qt. But since you are using QGraphicsView, then you should call update() as soon as possible...
-
depends on your application. if it is a game, i will do the same, but if it is a 3d application, i.e. a 2d modeler, you probably want to update the scene when your scene has changed. for example when window is resized or mouse dragged.