[vtk-developers] glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

Elvis Stansvik elvis.stansvik at orexplore.com
Tue May 16 12:28:02 EDT 2017


Den 16 maj 2017 5:53 em skrev "Utkarsh Ayachit" <utkarsh.ayachit at kitware.com
>:
>
> Another way to do the same is this:
>
>
https://gitlab.kitware.com/vtk/vtk/blob/master/GUISupport/Qt/Testing/Cxx/TestQVTKOpenGLWidget.cxx#L32-33

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.

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?

Elvis

>
> On Tue, May 16, 2017 at 11:50 AM, Róbert Špir <spir.robert at gmail.com>
wrote:
>>
>> Hi Elvis,
>> I also tried porting from QVTKWidget to QVTKOpenGLWidget and I had to
change
>> the surfaceformat part to this:
>>
>> QSurfaceFormat surfaceFormat = QVTKOpenGLWidget::defaultFormat();
>> surfaceFormat.setSamples(0);
>> QSurfaceFormat::setDefaultFormat(surfaceFormat);
>>
>> Otherwise I had black window.
>>
>> Robert
>>
>> -----Original Message-----
>> From: vtk-developers [mailto:vtk-developers-bounces at vtk.org] On Behalf Of
>> Elvis Stansvik
>> Sent: Tuesday, May 16, 2017 5:29 PM
>> To: vtkdev <vtk-developers at vtk.org>
>> Subject: [vtk-developers] glCopyTexImage2D errors + black windows when
>> porting QVTKWidget -> QVTKOpenGLWidget
>>
>> Today I tried porting our application from QVTKWidget to the new
>> QVTKOpenGLWidget available in VTK master. The application works fine when
>> running with the old QVTKWidget, but after porting to QVTKOpenGLWidget I
get
>> lots of:
>>
>> ERROR: In
>> /buildbot/vtk8-builder/build/Rendering/OpenGL2/vtkTextureObject.cxx,
>> line 2153
>> vtkTextureObject (0x275acb0): failed at glCopyTexImage2D 6402 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>> and all our render windows appear black.
>>
>> I followed the advice in the QVTKOpenGLWidget and use
>>
>>    QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());
>>
>> before constructing the QApplication, to set the correct surface format.
>>
>> Does this ring a bell to anyone?
>>
>> This is with:
>>
>>   Ubuntu 16.04
>>   Intel HD Graphics 4400
>>   VTK master @ 97e306e4cdaab9b7b0b25d73da61e220391156b4
>>
>> Thanks in advance for any advice. We need to port to QVTKOpenGLWidget as
>> soon as possible, to get proper support on retina screens.
>>
>> Cheers,
>> Elvis
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtk-developers
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtk-developers
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170516/34d5fae7/attachment.html>


More information about the vtk-developers mailing list