Oops ! Thanks a lot. I missed the if condition. <br>We are unsure if it is a vglrun bug because vglrun has run perfectly for us on different types of OpenGl  applications. Maybe there is some special opengl feature used by VTK which is not handled by vglrun, then we have to investigate on what that its.<br>
<br>I will send u the code to reproduce this bug. Its a simple QtGridLayout with four QVTKWidgets. <br><br>We will further try to zero in on the problem and keep u updated.<br><br>Thanks<br>-Shiva<br><br><div class="gmail_quote">
On Wed, Apr 8, 2009 at 11:24 PM, Clinton Stimpson <span dir="ltr"><<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
That code only gets called if you want to draw the vtk scene into something other than the QVTKWidget.<br>
So its direct rendering, except when you want to copy it into another QPaintDevice such as a QImage or QPixmap.  QPixmap::grabWidget() is a way to invoke that code.<br>
Under normal use, it really is doing direct rendering.<br>
<br>
I've also seen artifacts and trashed windows like yours when using compiz on Linux, and interestingly, I don't see it until a 4th child window is created, and your example has 4 child windows.<br>
<br>
Clint<br>
<br>
shiva sitamraju wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
I am pasting code from QVTKWidget.cxx  void QVTKWidget::resizeEvent(QResizeEvent* e)  function from vtk-5.4.<br>
As you can see it is calling this->mRenWin->GetRGBACharPixelData(0, 0, w-1, h-1, 1, pixels); <br>
<br>
  // In Qt 4.1+ let's support redirected painting<br>
#if QT_VERSION >= 0x040100<br>
  // if redirected, let's grab the image from VTK, and paint it to the device<br>
  QPaintDevice* device = QPainter::redirected(this);<br>
  if(device != NULL && device != this)<br>
    {<br>
    int w = this->width();<br>
    int h = this->height();<br>
    QImage img(w, h, QImage::Format_RGB32);<br>
    vtkUnsignedCharArray* pixels = vtkUnsignedCharArray::New();<br>
    pixels->SetArray(img.bits(), w*h*4, 1);<br>
    this->mRenWin->GetRGBACharPixelData(0, 0, w-1, h-1, 1, pixels);<br>
    pixels->Delete();<br>
    img = img.rgbSwapped();<br>
    img = img.mirrored();<br>
        QPainter painter(this);<br>
    painter.drawImage(QPointF(0.0,0.0), img);<br>
    return;<br>
<br></div><div class="im">
On Wed, Apr 8, 2009 at 3:32 AM, Clinton Stimpson <<a href="mailto:clinton@elemtech.com" target="_blank">clinton@elemtech.com</a> <mailto:<a href="mailto:clinton@elemtech.com" target="_blank">clinton@elemtech.com</a>>> wrote:<br>

<br>
<br>
    Could be a bug in vglrun ??<br>
    I don't know what readback you're referring to.  Its supposed to<br>
    render directly.<br>
<br>
    Clint<br>
<br>
    shiva sitamraju wrote:<br>
<br>
        Hi ,<br>
<br>
        We are using QVTKWidget in our application and running our<br>
        application remotely using vglrun.  Without using vglrun<br>
        everything is fine. I dont know if this is a problem with vtk<br>
        or virtualgl, but here are the issues:<br>
<br>
        1. With vglrun the QVTKWidget display isn't getting refreshed<br>
        properly (see the attached image)<br>
        2. Also I see that QVTKWidget is doing a readback and then<br>
        painting the qtwidget everytime refresh is performed.<br>
        I guess this readback maybe causing problems with virtualgl.<br>
        Is there a way to make VTK directly render to a qt opengl<br>
        context instead of doing a readback.<br>
<br>
        Thanks,<br>
        Shiva<br>
<br>
<br>
        ------------------------------------------------------------------------<br>
<br>
<br>
        ------------------------------------------------------------------------<br>
<br>
        _______________________________________________<br></div>
        Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><div class="im"><br>
<br>
        Visit other Kitware open-source projects at<br>
        <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
        Follow this link to subscribe/unsubscribe:<br>
        <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
         <br>
<br>
<br>
<br></div>
------------------------------------------------------------------------<br>
<br>
</blockquote>
<br>
</blockquote></div><br>