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

Elvis Stansvik elvis.stansvik at orexplore.com
Wed May 17 03:41:38 EDT 2017


2017-05-16 17:50 GMT+02:00 Róbert Špir <spir.robert at gmail.com>:
> 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: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
>


More information about the vtk-developers mailing list