Hi,

I'm following this example: 
http://doc-snapshot.qt-project.org/4.8/demos-glhypnotizer-main-cpp.html
but I fail to refresh the window... is blank.

This is my code on glPainter:

Code:

GLPainter::GLPainter(ViewerQT *widget)
     : glWidget(widget)
     , doRendering(true)
 {
 }

 void GLPainter::start()
 {
         glWidget->AdapterWidget::makeCurrent();
         QTimer timer;
         connect(&timer, SIGNAL(timeout()), glWidget, SLOT(updateGL()));
         timer.start(10);
     startTimer(20);
 }

 void GLPainter::stop()
 {
     QMutexLocker locker(&mutex);
     doRendering = false;
 }

 void GLPainter::resizeViewport(const QSize &size)
 {
     QMutexLocker locker(&mutex);
     viewportWidth = size.width();
     viewportHeight = size.height();

 }

 void GLPainter::timerEvent(QTimerEvent *event)
 {
     QMutexLocker locker(&mutex);
     if (!doRendering) {
         killTimer(event->timerId());
         QThread::currentThread()->quit();
         return;
     }
        // glWidget->updateFrame();
 }




I initialize the GLWidget like the example and the thread go well but when I 
call glWidget->frame() dont refresh the osg and if I put a connection between 
timer and updateGL() fails to call paintGL().

What am I doing wrong?

Thank you!

Cheers,
Aitor

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46554#46554





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to