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><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>    
<br>    QPainter painter(this);
<br>    painter.drawImage(QPointF(0.0,0.0), img);
<br>    return;<br><br><div class="gmail_quote">On Wed, Apr 8, 2009 at 3:32 AM, 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>
Could be a bug in vglrun ??<br>
I don't know what readback you're referring to.  Its supposed to render directly.<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><div></div><div class="h5">
Hi ,<br>
<br>
We are using QVTKWidget in our application and running our application remotely using vglrun.  Without using vglrun everything is fine. I dont know if this is a problem with vtk or virtualgl, but here are the issues:<br>

<br>
1. With vglrun the QVTKWidget display isn't getting refreshed properly (see the attached image)<br>
2. Also I see that QVTKWidget is doing a readback and then painting the qtwidget everytime refresh is performed.<br>
I guess this readback maybe causing problems with virtualgl. Is there a way to make VTK directly render to a qt opengl context instead of doing a readback.<br>
<br>
Thanks,<br>
Shiva<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <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>
</blockquote>
<br>
</blockquote></div><br>