<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1478044850231_3937" dir="ltr"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4241">That's right, the problem only happens if there are more than one QVTKWidget. </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4242"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4243"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4244">I've managed to create a fairly simple example to reproduce the problem: </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4245"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4246"><a href="https://drive.google.com/open?id=0BxalkOjn2_PecG5kUUZrN2djMlU" target="_top" rel="nofollow" link="external" style="font-size: 13.44px; color: rgb(85, 26, 139); font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);" id="yui_3_16_0_ym19_1_1478044850231_4247">https://drive.google.com/open?id=0BxalkOjn2_PecG5kUUZrN2djMlU</a><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4248"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4249"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4250">It's a very basic modification of the SideBySideRenderWindowsQt example provided by VTK. I've simply added a button, and when it's clicked it will clear the left window and add a sphere, then clear the right window and add a sphere. If I do the following it produces the OpenGL errors every time for me: </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4251"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4252"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4253">1. Click the button. </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4254"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4255">2. Manually rotate both spheres. </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4256"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4257">3. Click the button. </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4258"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4259">4. Manually rotate both spheres. </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4260"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4261">5. Click the button. </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4262"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4263">6. Manually rotate both spheres. (You'll get the errors here) </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4264"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4265"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4266">Here's the code below. Interestingly if I move both clear calls before both of the addsphere calls it works fine. Unfortunately that approach won't work for my app (needs to be able to change a single window). </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4267"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4268"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4269"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4270">#include "SideBySideRenderWindowsQt.h" </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4271"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4272"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4273">void addsphere(vtkSmartPointer<vtkRenderWindow> renwin) </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4274"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4275">{ </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4276"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4277"> vtkSmartPointer<vtkSphereSource> sphereSource = </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4278"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4279"> vtkSmartPointer<vtkSphereSource>::New(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4280"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4281"> sphereSource->SetCenter(0.0, 0.0, 0.0); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4282"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4283"> sphereSource->SetRadius(5.0); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4284"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4285"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4286"> vtkSmartPointer<vtkPolyDataMapper> mapper = </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4287"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4288"> vtkSmartPointer<vtkPolyDataMapper>::New(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4289"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4290"> mapper->SetInputConnection(sphereSource->GetOutputPort()); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4291"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4292"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4293"> vtkSmartPointer<vtkActor> actor = </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4294"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4295"> vtkSmartPointer<vtkActor>::New(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4296"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4297"> actor->SetMapper(mapper); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4298"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4299"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4300"> vtkSmartPointer<vtkRenderer> ren = vtkSmartPointer<vtkRenderer>::New(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4301"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4302"> ren->AddActor(actor); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4303"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4304"> ren->ResetCameraClippingRange(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4305"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4306"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4307"> renwin->AddRenderer(ren); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4308"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4309"> renwin->Render(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4310"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4311">} </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4312"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4313"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4314">void clear(vtkSmartPointer<vtkRenderWindow> renwin) </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4315"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4316">{ </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4317"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4318"> // clear renderer </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4319"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4320"> vtkSmartPointer<vtkRenderer> ren = </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4321"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4322"> renwin->GetRenderers()->GetFirstRenderer(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4323"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4324"> if (ren) </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4325"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4326"> { </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4327"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4328"> ren->RemoveAllViewProps(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4329"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4330"> renwin->Render(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4331"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4332"> renwin->RemoveRenderer(ren); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4333"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4334"> } </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4335"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4336">} </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4337"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4338"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4339">// Constructor </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4340"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4341">SideBySideRenderWindowsQt::SideBySideRenderWindowsQt() </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4342"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4343">{ </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4344"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4345"> this->setupUi(this); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4346"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4347"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4348"> QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1())); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4349"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4350"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4351"> // Set up action signals and slots </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4352"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4353"> connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4354"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4355">} </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4356"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4357"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4358">void SideBySideRenderWindowsQt::slot_b1() </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4359"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4360">{ </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4361"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4362"> clear(this->qvtkWidgetLeft->GetRenderWindow()); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4363"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4364"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4365"> addsphere(this->qvtkWidgetLeft->GetRenderWindow()); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4366"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4367"> this->qvtkWidgetLeft->GetRenderWindow()->Render(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4368"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4369"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4370"> clear(this->qvtkWidgetRight->GetRenderWindow()); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4371"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4372"> </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4373"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4374"> addsphere(this->qvtkWidgetRight->GetRenderWindow()); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4375"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4376"> this->qvtkWidgetRight->GetRenderWindow()->Render(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4377"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4378">} </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4379"><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4380"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4381">void SideBySideRenderWindowsQt::slotExit() </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4382"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4383">{ </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4384"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4385"> qApp->exit(); </span><br style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4386"><span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px;" id="yui_3_16_0_ym19_1_1478044850231_4387">} </span><span></span></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1478044850231_3938"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1478044850231_3944" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1478044850231_3943"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1478044850231_3942"> <div dir="ltr" id="yui_3_16_0_ym19_1_1478044850231_3941"> <font size="2" face="Arial" id="yui_3_16_0_ym19_1_1478044850231_3940"> <hr size="1" id="yui_3_16_0_ym19_1_1478044850231_3939"> <b><span style="font-weight:bold;">From:</span></b> Thales Luis Rodrigues Sabino <tluisrs@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Mike Withascarf <mikewithascarf@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "vtkusers@vtk.org" <vtkusers@vtk.org><br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, November 1, 2016 7:19 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [vtkusers] QT VTK OpenGL errors<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1478044850231_4398"><br><div id="yiv2714357475"><div id="yui_3_16_0_ym19_1_1478044850231_4397"><div dir="ltr">This looks like an OpenGL resource sharing issue. I don't know exactly how VTK handles multiples windows in a Qt application but it looks like it is trying to bind a texture that is not registered in a certain context.<div><br clear="none"></div><div>Can tell if this happens when you have a single window or this happens only when you add a second window?</div></div><div class="yiv2714357475gmail_extra" id="yui_3_16_0_ym19_1_1478044850231_4396"><br clear="none"><div class="yiv2714357475gmail_quote" id="yui_3_16_0_ym19_1_1478044850231_4395">On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:vtkusers@vtk.org" target="_blank" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>></span> wrote:<br clear="none"><blockquote class="yiv2714357475gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" id="yui_3_16_0_ym19_1_1478044850231_4394"><div class="yiv2714357475yqt1686940766" id="yiv2714357475yqt01063"><div id="yui_3_16_0_ym19_1_1478044850231_4393"><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;" id="yui_3_16_0_ym19_1_1478044850231_4392"><div dir="ltr" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8836"><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8988" style="">I'm using QT with VTK for a fairly complex application. Everything works fine</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8989" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8990" style="">normally, but if I try to use a function to 'clear' the QVTKWidget, and then</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8991" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8992" style="">add a new pipeline, I run into lots of OpenGL errors. What would be the</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8993" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8994" style="">appropriate way to clear the window/renderer? Here is the code I've been</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8995" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8996" style="">trying, where window is of type QVTKWidget:</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8997" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8998" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_8999" style="">vtkSmartPointer<vtkRenderer> ren_old =</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9000" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9001" style="">window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer();</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9002" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9003" style="">if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9004" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9005" style="">renderer</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9006" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9007" style="">if (window->isVisible() && window->GetRenderWindow()-> IsDrawable())</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9008" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9009" style="">window->GetRenderWindow()-> Render(); // Update the window so it is blank</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9010" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9011" style="">if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9012" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9013" style="">the renderer</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9014" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9015" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9016" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9017" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9018" style="">I'm using multiple QVTKWidgets in one app, and each might have a pipeline</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9019" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9020" style="">that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9021" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9022" style="">the OpenGL errors reported in the vtkOutputWindow:</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9023" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9024" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9025" style="">ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9026" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9027" style="">vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9028" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9029" style="">detected</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9030" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9031" style=""> 0 : (1282) Invalid operation</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9032" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9033" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9034" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9035" style="">ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9036" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9037" style="">vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9038" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9039" style="">errors detected</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9040" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9041" style=""> 0 : (1282) Invalid operation</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9042" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9043" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9044" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9045" style="">ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9046" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9047" style="">vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9048" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9049" style="">detected</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9050" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9051" style=""> 0 : (1282) Invalid operation</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9052" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9053" style=""><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9054" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9055" style="">ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9056" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9057" style="">vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9058" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9059" style="">errors detected</span><br clear="none" id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9060" style=""><span id="yiv2714357475m_-4913760649112231020yui_3_16_0_ym19_1_1478038332580_9061" style=""> 0 : (1282) Invalid operation</span><br clear="none"></div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
Powered by <a rel="nofollow" shape="rect" target="_blank" href="http://www.kitware.com/">www.kitware.com</a><br clear="none">
<br clear="none">
Visit other Kitware open-source projects at <a rel="nofollow" shape="rect" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/ opensource/opensource.html</a><br clear="none">
<br clear="none">
Please keep messages on-topic and check the VTK FAQ at: <a rel="nofollow" shape="rect" target="_blank" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_ FAQ</a><br clear="none">
<br clear="none">
Search the list archives at: <a rel="nofollow" shape="rect" target="_blank" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q= vtkusers</a><br clear="none">
<br clear="none">
Follow this link to subscribe/unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/ mailman/listinfo/vtkusers</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div class="yiv2714357475gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Thales Luis Rodrigues Sabino</div><div><br clear="none"></div><div>PhD Student at <a rel="nofollow" shape="rect" target="_blank" href="http://www.ufjf.br/pgmc/">PGMC-UFJF</a></div><div><a rel="nofollow" shape="rect" target="_blank" href="http://lattes.cnpq.br/0601030410417146">Lattes</a> | <a rel="nofollow" shape="rect" target="_blank" href="https://br.linkedin.com/in/tluisrs">LinkedIn</a> | <a rel="nofollow" shape="rect" target="_blank" href="https://www.researchgate.net/profile/Thales_Luis_Sabino">ResearchGate</a></div></div></div></div></div>
</div></div></div><br><br></div> </div> </div> </div></div></body></html>