glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

Elvis Stansvik
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

Reply | Threaded
Open this post in threaded view
|

Re: glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

Utkarsh Ayachit
Try running the `vtkGUISupportQtCxx-TestQVTKOpenGLWidget` test. Does it pass?

If you can share the code how this is setup, we can see if something off. Also, try downloading ParaView 5.3 or later. Does it work on your system?

Utkarsh

On Tue, May 16, 2017 at 11:29 AM, Elvis Stansvik <[hidden email]> wrote:
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

Reply | Threaded
Open this post in threaded view
|

Re: glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

RobertS
In reply to this post by Elvis Stansvik
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:[hidden email]] On Behalf Of
Elvis Stansvik
Sent: Tuesday, May 16, 2017 5:29 PM
To: vtkdev <[hidden email]>
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

Reply | Threaded
Open this post in threaded view
|

Re: glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

Utkarsh Ayachit

On Tue, May 16, 2017 at 11:50 AM, Róbert Špir <[hidden email]> 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:[hidden email]] On Behalf Of
Elvis Stansvik
Sent: Tuesday, May 16, 2017 5:29 PM
To: vtkdev <[hidden email]>
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



_______________________________________________
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

Reply | Threaded
Open this post in threaded view
|

Re: glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

Elvis Stansvik

Den 16 maj 2017 5:53 em skrev "Utkarsh Ayachit" <[hidden email]>:
>
> 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 <[hidden email]> 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:[hidden email]] On Behalf Of
>> Elvis Stansvik
>> Sent: Tuesday, May 16, 2017 5:29 PM
>> To: vtkdev <[hidden email]>
>> 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
>>
>


_______________________________________________
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

Reply | Threaded
Open this post in threaded view
|

Re: glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

Utkarsh Ayachit

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?


MSAA works fine with QVTKOpenGLWidget. We use it in ParaView for 2D chart views. It's worth also trying out the `vtkGUISupportQtCxx-TestQVTKOpenGLWidgetWithMSAA` test.

_______________________________________________
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

Reply | Threaded
Open this post in threaded view
|

Re: glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

RobertS

for me, msaa works for polydata but not for volume rendering. Volume rendering does not show with samples>0

I have entire black screen with msaa and FXAA

With only FXAA, volume rendering works ok.

 

 

From: Utkarsh Ayachit [mailto:[hidden email]]
Sent: Tuesday, May 16, 2017 6:43 PM
To: Elvis Stansvik <[hidden email]>
Cc: vtkdev <[hidden email]>; RobertS <[hidden email]>
Subject: Re: [vtk-developers] glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

 

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?

 

MSAA works fine with QVTKOpenGLWidget. We use it in ParaView for 2D chart views. It's worth also trying out the `vtkGUISupportQtCxx-TestQVTKOpenGLWidgetWithMSAA` test.


_______________________________________________
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

Reply | Threaded
Open this post in threaded view
|

Re: glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

Utkarsh Ayachit

for me, msaa works for polydata but not for volume rendering. Volume rendering does not show with samples>0


That points to a inability of the volume mapper to work with a MSAA capable FBO to render into. Please report this as a issue with details on which volume mapper you're using. Should be addressable. 


_______________________________________________
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

Reply | Threaded
Open this post in threaded view
|

Re: glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

Elvis Stansvik
In reply to this post by RobertS
2017-05-16 17:50 GMT+02:00 Róbert Špir <[hidden email]>:
> 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.

Just a quick update regarding this workaround (I'm currently
rebuilding VTK with testing enabled, to run the tests Utkarsh
suggested): With the above workaround (setSamples(0)), I instead get
"hollow" render windows where I can see through to the windows behind
them. When I resize the window, I can sometimes see some hints of my
actors in the render windows, but it's all very garbled.

When building is finished, I'll get back with my results from running
the vtkGUISupportQtCxx-TestQVTKOpenGLWidget test.

Elvis

>
> Robert
>
> -----Original Message-----
> From: vtk-developers [mailto:[hidden email]] On Behalf Of
> Elvis Stansvik
> Sent: Tuesday, May 16, 2017 5:29 PM
> To: vtkdev <[hidden email]>
> 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

Reply | Threaded
Open this post in threaded view
|

Re: glCopyTexImage2D errors + black windows when porting QVTKWidget -> QVTKOpenGLWidget

Elvis Stansvik
2017-05-17 9:41 GMT+02:00 Elvis Stansvik <[hidden email]>:

> 2017-05-16 17:50 GMT+02:00 Róbert Špir <[hidden email]>:
>> 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.
>
> Just a quick update regarding this workaround (I'm currently
> rebuilding VTK with testing enabled, to run the tests Utkarsh
> suggested): With the above workaround (setSamples(0)), I instead get
> "hollow" render windows where I can see through to the windows behind
> them. When I resize the window, I can sometimes see some hints of my
> actors in the render windows, but it's all very garbled.
>
> When building is finished, I'll get back with my results from running
> the vtkGUISupportQtCxx-TestQVTKOpenGLWidget test.

Sorry all for the noise. During porting, I had left in some wonky
workaround for QTBUG-40889 (fixed in Qt 5.6) that we had in place. It
was messing with the paintEvent of our QVTKWidget subclass. After
removing that workaround, rendering is back to normal and the new
widget seems to work fine.

Well... almost, because I still have some strange rendering issues
compared to the old QVTKWidget, but I'll make separate posts about
those once I've had a closer look.

The vtkGUISupportQtCxx-TestQVTKOpenGLWidget is passing.

Elvis

>
> Elvis
>
>>
>> Robert
>>
>> -----Original Message-----
>> From: vtk-developers [mailto:[hidden email]] On Behalf Of
>> Elvis Stansvik
>> Sent: Tuesday, May 16, 2017 5:29 PM
>> To: vtkdev <[hidden email]>
>> 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