<p dir="ltr">Den 16 maj 2017 5:53 em skrev "Utkarsh Ayachit" <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>>:<br>
><br>
> Another way to do the same is this:<br>
><br>
> <a href="https://gitlab.kitware.com/vtk/vtk/blob/master/GUISupport/Qt/Testing/Cxx/TestQVTKOpenGLWidget.cxx#L32-33">https://gitlab.kitware.com/vtk/vtk/blob/master/GUISupport/Qt/Testing/Cxx/TestQVTKOpenGLWidget.cxx#L32-33</a></p>
<p dir="ltr">Thanks to both of you for your quick replies. On my way home now but will try your suggestions asap. If the test passes I'll try to do a minimal testcase with the problem.</p>
<p dir="ltr">Regarding setting max samples to 0, does this mean I will no longer be able to use MSAA? I wasn't actually doing that in the old code (setting it to 0), just hadn't ported that part so it was commented when I ported to the new widget. But I was using MSAA at one point and it was working fine (samples set to 8). Will this no longer be possible with the new widget?</p>
<p dir="ltr">Elvis<br></p>
<p dir="ltr">><br>
> On Tue, May 16, 2017 at 11:50 AM, Róbert Špir <<a href="mailto:spir.robert@gmail.com">spir.robert@gmail.com</a>> wrote:<br>
>><br>
>> Hi Elvis,<br>
>> I also tried porting from QVTKWidget to QVTKOpenGLWidget and I had to change<br>
>> the surfaceformat part to this:<br>
>><br>
>> QSurfaceFormat surfaceFormat = QVTKOpenGLWidget::defaultFormat();<br>
>> surfaceFormat.setSamples(0);<br>
>> QSurfaceFormat::setDefaultFormat(surfaceFormat);<br>
>><br>
>> Otherwise I had black window.<br>
>><br>
>> Robert<br>
>><br>
>> -----Original Message-----<br>
>> From: vtk-developers [mailto:<a href="mailto:vtk-developers-bounces@vtk.org">vtk-developers-bounces@vtk.org</a>] On Behalf Of<br>
>> Elvis Stansvik<br>
>> Sent: Tuesday, May 16, 2017 5:29 PM<br>
>> To: vtkdev <<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a>><br>
>> Subject: [vtk-developers] glCopyTexImage2D errors + black windows when<br>
>> porting QVTKWidget -> QVTKOpenGLWidget<br>
>><br>
>> Today I tried porting our application from QVTKWidget to the new<br>
>> QVTKOpenGLWidget available in VTK master. The application works fine when<br>
>> running with the old QVTKWidget, but after porting to QVTKOpenGLWidget I get<br>
>> lots of:<br>
>><br>
>> ERROR: In<br>
>> /buildbot/vtk8-builder/build/Rendering/OpenGL2/vtkTextureObject.cxx,<br>
>> line 2153<br>
>> vtkTextureObject (0x275acb0): failed at glCopyTexImage2D 6402 1 OpenGL<br>
>> errors detected<br>
>> 0 : (1282) Invalid operation<br>
>><br>
>> and all our render windows appear black.<br>
>><br>
>> I followed the advice in the QVTKOpenGLWidget and use<br>
>><br>
>> QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());<br>
>><br>
>> before constructing the QApplication, to set the correct surface format.<br>
>><br>
>> Does this ring a bell to anyone?<br>
>><br>
>> This is with:<br>
>><br>
>> Ubuntu 16.04<br>
>> Intel HD Graphics 4400<br>
>> VTK master @ 97e306e4cdaab9b7b0b25d73da61e220391156b4<br>
>><br>
>> Thanks in advance for any advice. We need to port to QVTKOpenGLWidget as<br>
>> soon as possible, to get proper support on retina screens.<br>
>><br>
>> Cheers,<br>
>> Elvis<br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers">http://markmail.org/search/?q=vtk-developers</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
>><br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers">http://markmail.org/search/?q=vtk-developers</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
>><br>
></p>