Thanks,
I have managed to render an opengl scene under the qt quick scene. I largely followed the tutorial titled - "Scene Graph - OpenGL Under QML"
Now i want to animate the opengl scene that contains a teapot. I usually rotate the opengl scene using the Qt' s timer event and timer function as follows:
connect(timer,SIGNAL(timeout()),this,SLOT(updateScene()));
timer->start();
QTimer *timer = new QTimer(this);
connect(timer,SIGNAL(timeout()),this,SLOT(updateScene()));
timer->start();
To copy to clipboard, switch view to plain text mode
And inside the updateScene() slot I have the following :
void GLWindow::updateScene()
{
float t = mTime.elapsed() * 0.001;
mScene->update(t);
paintGL();
}
void GLWindow::updateScene()
{
float t = mTime.elapsed() * 0.001;
mScene->update(t);
paintGL();
}
To copy to clipboard, switch view to plain text mode
I used the same mechanism while integrating qt quick with opengl underlay, but the teapot only rotates for a while with the mouse click and it stops. I want the teapot to rotate continuously untill the application closes.
Any hint to achieve this ?
Thanks
Bookmarks