Discussion:
[vtkusers] Is -DVTK_RENDERING_BACKEND=OpenGL needed for Haswell with 7.0.0?
Elvis Stansvik
2016-05-25 08:50:51 UTC
Permalink
Hi all,

I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial).

The machine where I need this to run has a Haswell Intel graphics chip
(Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile. Will
the new OpenGL backend (the version in 7.0.0) support this graphics card,
or will I need to use the old backend with -DVTK_RENDERING_BACKEND=OpenGL?

I read that support for is for Ivy Bridge and later in 7.0.0, so I think I
should be OK right?

Thanks in advance,
Elvis
Ken Martin
2016-05-25 11:49:43 UTC
Permalink
Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken

On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik <
Post by Elvis Stansvik
Hi all,
I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial).
The machine where I need this to run has a Haswell Intel graphics chip
(Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile. Will
the new OpenGL backend (the version in 7.0.0) support this graphics card,
or will I need to use the old backend with -DVTK_RENDERING_BACKEND=OpenGL?
I read that support for is for Ivy Bridge and later in 7.0.0, so I think I
should be OK right?
Thanks in advance,
Elvis
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
http://public.kitware.com/mailman/listinfo/vtkusers
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.
Elvis Stansvik
2016-05-25 15:08:33 UTC
Permalink
Post by Ken Martin
Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken
Great, thanks!

Elvis
Post by Ken Martin
On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik <
Post by Elvis Stansvik
Hi all,
I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial).
The machine where I need this to run has a Haswell Intel graphics chip
(Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile. Will
the new OpenGL backend (the version in 7.0.0) support this graphics card,
or will I need to use the old backend with -DVTK_RENDERING_BACKEND=OpenGL?
I read that support for is for Ivy Bridge and later in 7.0.0, so I think
I should be OK right?
Thanks in advance,
Elvis
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
http://public.kitware.com/mailman/listinfo/vtkusers
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.
Elvis Stansvik
2016-06-26 09:01:21 UTC
Permalink
Post by Elvis Stansvik
Post by Ken Martin
Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken
Hm, initially it seemed like things were working fine. I was using the GPU
based volume mapper without problems (using a modified
QVTKRenderWindowInteractor), and I _think_ I was using the OpenGL2 backend
(how can I tell btw?).

But now, as I started trying to make a QOpenGLWidget-based Qt<->VTK adapter
class instead, I get the following when trying to initialize the render
window:

ERROR: In
/home/estan/Blandat/vtk-python3/src/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx,
line 545
vtkGenericOpenGLRenderWindow (0x205fb10): GL version 2.1 with the
gpu_shader4 extension is not supported by your graphics driver but is
required for the new OpenGL rendering backend. Please update your OpenGL
driver. If you are using Mesa please make sure you have version 10.6.5 or
later and make sure your driver in Mesa supports OpenGL 3.2.

And sure enough:

***@newton:~$ glxinfo | grep "OpenGL version"
OpenGL version string: 3.0 Mesa 11.2.0

However:

***@newton:~$ glxinfo | grep "OpenGL core profile version"
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0

I'm a little unsure about which of these version numbers I should be
looking at to see if my graphics has what it takes.

Also, I'm now even unsure if I was ever using the OpenGL2 backend.. perhaps
VTK was falling back to OpenGL1 somehow, and that's why it worked in the
beginning? Or is the selection of backend always a compile time thing?

I build my VTK 7.0.0 in a Personal Package Archive at:

https://launchpad.net/~elvstone/+archive/ubuntu/vtk7

and the full build log is at:


https://launchpadlibrarian.net/261625779/buildlog_ubuntu-xenial-amd64.vtk7_7.0.0-0ubuntu2_BUILDING.txt.gz

Any advice is much appreciated!

I'm considering switching to the old OpenGL1 backend anyway, since I
realized my laptop at home only has a Sandybridge chipset (at work it's
Haswell), and it's convenient to be able to do some work from my home
laptop. But I'd like to know why I get the above error on my work laptop,
since I thought it'd be compatible.

Elvis
Post by Elvis Stansvik
Great, thanks!
Elvis
Post by Ken Martin
On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik <
Post by Elvis Stansvik
Hi all,
I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial).
The machine where I need this to run has a Haswell Intel graphics chip
(Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile. Will
the new OpenGL backend (the version in 7.0.0) support this graphics card,
or will I need to use the old backend with -DVTK_RENDERING_BACKEND=OpenGL?
I read that support for is for Ivy Bridge and later in 7.0.0, so I think
I should be OK right?
Thanks in advance,
Elvis
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
http://public.kitware.com/mailman/listinfo/vtkusers
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.
Elvis Stansvik
2016-06-26 09:05:25 UTC
Permalink
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Ken Martin
Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken
Hm, initially it seemed like things were working fine. I was using the GPU
based volume mapper without problems (using a modified
QVTKRenderWindowInteractor), and I _think_ I was using the OpenGL2 backend
(how can I tell btw?).
But now, as I started trying to make a QOpenGLWidget-based Qt<->VTK
adapter class instead, I get the following when trying to initialize the
ERROR: In
/home/estan/Blandat/vtk-python3/src/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx,
line 545
vtkGenericOpenGLRenderWindow (0x205fb10): GL version 2.1 with the
gpu_shader4 extension is not supported by your graphics driver but is
required for the new OpenGL rendering backend. Please update your OpenGL
driver. If you are using Mesa please make sure you have version 10.6.5 or
later and make sure your driver in Mesa supports OpenGL 3.2.
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
I'm a little unsure about which of these version numbers I should be
looking at to see if my graphics has what it takes.
Also, I'm now even unsure if I was ever using the OpenGL2 backend..
perhaps VTK was falling back to OpenGL1 somehow, and that's why it worked
in the beginning? Or is the selection of backend always a compile time
thing?
https://launchpad.net/~elvstone/+archive/ubuntu/vtk7
https://launchpadlibrarian.net/261625779/buildlog_ubuntu-xenial-amd64.vtk7_7.0.0-0ubuntu2_BUILDING.txt.gz
Okay, so looking at that build log, I see:

-- Setting rendering backend to 'OpenGL2' as none was specified.
-- Backend OpenGL modules:
vtkRenderingContextOpenGL;vtkRenderingOpenGL;vtkRenderingLIC;vtkRenderingVolumeOpenGL;vtkRenderingGL2PS
-- Backend OpenGL2 modules:
vtkRenderingContextOpenGL2;vtkRenderingVolumeOpenGL2;vtkRenderingOpenGL2;vtkRenderingLICOpenGL2;vtkDomainsChemistryOpenGL2
-- Enabling modules for OpenGL2.


Does this mean I'll always be using the OpenGL2 backend, or that OpenGL vs
OpenGL2 is a runtime choice?

Elvis
Post by Elvis Stansvik
Any advice is much appreciated!
I'm considering switching to the old OpenGL1 backend anyway, since I
realized my laptop at home only has a Sandybridge chipset (at work it's
Haswell), and it's convenient to be able to do some work from my home
laptop. But I'd like to know why I get the above error on my work laptop,
since I thought it'd be compatible.
Elvis
Post by Elvis Stansvik
Great, thanks!
Elvis
Post by Ken Martin
On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik <
Post by Elvis Stansvik
Hi all,
I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial).
The machine where I need this to run has a Haswell Intel graphics chip
(Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile. Will
the new OpenGL backend (the version in 7.0.0) support this graphics card,
or will I need to use the old backend with -DVTK_RENDERING_BACKEND=OpenGL?
I read that support for is for Ivy Bridge and later in 7.0.0, so I
think I should be OK right?
Thanks in advance,
Elvis
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
http://public.kitware.com/mailman/listinfo/vtkusers
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.
Elvis Stansvik
2016-06-26 09:42:30 UTC
Permalink
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Ken Martin
Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken
Hm, initially it seemed like things were working fine. I was using the
GPU based volume mapper without problems (using a modified
QVTKRenderWindowInteractor), and I _think_ I was using the OpenGL2 backend
(how can I tell btw?).
But now, as I started trying to make a QOpenGLWidget-based Qt<->VTK
adapter class instead, I get the following when trying to initialize the
ERROR: In
/home/estan/Blandat/vtk-python3/src/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx,
line 545
vtkGenericOpenGLRenderWindow (0x205fb10): GL version 2.1 with the
gpu_shader4 extension is not supported by your graphics driver but is
required for the new OpenGL rendering backend. Please update your OpenGL
driver. If you are using Mesa please make sure you have version 10.6.5 or
later and make sure your driver in Mesa supports OpenGL 3.2.
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
I'm a little unsure about which of these version numbers I should be
looking at to see if my graphics has what it takes.
Also, I'm now even unsure if I was ever using the OpenGL2 backend..
perhaps VTK was falling back to OpenGL1 somehow, and that's why it worked
in the beginning? Or is the selection of backend always a compile time
thing?
https://launchpad.net/~elvstone/+archive/ubuntu/vtk7
https://launchpadlibrarian.net/261625779/buildlog_ubuntu-xenial-amd64.vtk7_7.0.0-0ubuntu2_BUILDING.txt.gz
-- Setting rendering backend to 'OpenGL2' as none was specified.
-- Backend OpenGL modules: vtkRenderingContextOpenGL;vtkRenderingOpenGL;vtkRenderingLIC;vtkRenderingVolumeOpenGL;vtkRenderingGL2PS
-- Backend OpenGL2 modules: vtkRenderingContextOpenGL2;vtkRenderingVolumeOpenGL2;vtkRenderingOpenGL2;vtkRenderingLICOpenGL2;vtkDomainsChemistryOpenGL2
-- Enabling modules for OpenGL2.
Does this mean I'll always be using the OpenGL2 backend, or that OpenGL vs
OpenGL2 is a runtime choice?
I've now done some testing here at home, on my old Sandybridge laptop which
I think only has a HD 3000 graphics chip:

[***@pyret ~]$ glxinfo | grep "OpenGL version"
OpenGL version string: 3.0 Mesa 11.2.2

and the "Extended renderer info" section says:

Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel Open Source Technology Center (0x8086)
Device: Mesa DRI Intel(R) Sandybridge Mobile (0x126)
Version: 11.2.2
Accelerated: yes
Video memory: 1536MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0

And it turns out that all I had to do in my little QOpenGLWidget-adapter
was:

surfaceFormat.setMajorVersion(3)
surfaceFormat.setMinorVersion(2)
surfaceFormat.setProfile(QSurfaceFormat.CompatibilityProfile)
self.setFormat(surfaceFormat)

to request OpenGL 3.2 compatibility profile. After this I no longer get the
error and rendering seems to work.

I'm actually a little surprised this works, since I didn't think my old
home laptop would support the OpenGL2 backend. And the glxinfo output shows
"Max compat profile version: 3.0". But printing the
.format().majorVersion() and .format().minorVersion() after setting it on
the QOpenGLWidget confirms that I've gotten the 3.2 format set.

Oh well, I'm happy now, but would still like some clarification from
someone who knows more than me about these things.

Elvis
Post by Elvis Stansvik
Elvis
Post by Elvis Stansvik
Any advice is much appreciated!
I'm considering switching to the old OpenGL1 backend anyway, since I
realized my laptop at home only has a Sandybridge chipset (at work it's
Haswell), and it's convenient to be able to do some work from my home
laptop. But I'd like to know why I get the above error on my work laptop,
since I thought it'd be compatible.
Elvis
Post by Elvis Stansvik
Great, thanks!
Elvis
Post by Ken Martin
On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik <
Post by Elvis Stansvik
Hi all,
I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial).
The machine where I need this to run has a Haswell Intel graphics chip
(Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile. Will
the new OpenGL backend (the version in 7.0.0) support this graphics card,
or will I need to use the old backend with -DVTK_RENDERING_BACKEND=OpenGL?
I read that support for is for Ivy Bridge and later in 7.0.0, so I
think I should be OK right?
Thanks in advance,
Elvis
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
http://public.kitware.com/mailman/listinfo/vtkusers
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains confidential
and legally privileged information, and it is intended only for the use of
the addressee. Access to this email by anyone else is unauthorized. If you
are not the intended recipient, any disclosure, copying, distribution or
any action taken in reliance on it is prohibited and may be unlawful. If
you received this communication in error please notify us immediately and
destroy the original message. Thank you.
Elvis Stansvik
2016-06-26 09:45:31 UTC
Permalink
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Ken Martin
Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken
Hm, initially it seemed like things were working fine. I was using the
GPU based volume mapper without problems (using a modified
QVTKRenderWindowInteractor), and I _think_ I was using the OpenGL2 backend
(how can I tell btw?).
But now, as I started trying to make a QOpenGLWidget-based Qt<->VTK
adapter class instead, I get the following when trying to initialize the
ERROR: In
/home/estan/Blandat/vtk-python3/src/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx,
line 545
vtkGenericOpenGLRenderWindow (0x205fb10): GL version 2.1 with the
gpu_shader4 extension is not supported by your graphics driver but is
required for the new OpenGL rendering backend. Please update your OpenGL
driver. If you are using Mesa please make sure you have version 10.6.5 or
later and make sure your driver in Mesa supports OpenGL 3.2.
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
I'm a little unsure about which of these version numbers I should be
looking at to see if my graphics has what it takes.
Also, I'm now even unsure if I was ever using the OpenGL2 backend..
perhaps VTK was falling back to OpenGL1 somehow, and that's why it worked
in the beginning? Or is the selection of backend always a compile time
thing?
https://launchpad.net/~elvstone/+archive/ubuntu/vtk7
https://launchpadlibrarian.net/261625779/buildlog_ubuntu-xenial-amd64.vtk7_7.0.0-0ubuntu2_BUILDING.txt.gz
-- Setting rendering backend to 'OpenGL2' as none was specified.
-- Backend OpenGL modules: vtkRenderingContextOpenGL;vtkRenderingOpenGL;vtkRenderingLIC;vtkRenderingVolumeOpenGL;vtkRenderingGL2PS
-- Backend OpenGL2 modules: vtkRenderingContextOpenGL2;vtkRenderingVolumeOpenGL2;vtkRenderingOpenGL2;vtkRenderingLICOpenGL2;vtkDomainsChemistryOpenGL2
-- Enabling modules for OpenGL2.
Does this mean I'll always be using the OpenGL2 backend, or that OpenGL
vs OpenGL2 is a runtime choice?
I've now done some testing here at home, on my old Sandybridge laptop
OpenGL version string: 3.0 Mesa 11.2.2
Vendor: Intel Open Source Technology Center (0x8086)
Device: Mesa DRI Intel(R) Sandybridge Mobile (0x126)
Version: 11.2.2
Accelerated: yes
Video memory: 1536MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
And it turns out that all I had to do in my little QOpenGLWidget-adapter
surfaceFormat.setMajorVersion(3)
surfaceFormat.setMinorVersion(2)
surfaceFormat.setProfile(QSurfaceFormat.CompatibilityProfile)
self.setFormat(surfaceFormat)
to request OpenGL 3.2 compatibility profile. After this I no longer get
the error and rendering seems to work.
I'm actually a little surprised this works, since I didn't think my old
home laptop would support the OpenGL2 backend. And the glxinfo output shows
"Max compat profile version: 3.0". But printing the
.format().majorVersion() and .format().minorVersion() after setting it on
the QOpenGLWidget confirms that I've gotten the 3.2 format set.
Oh well, I'm happy now, but would still like some clarification from
someone who knows more than me about these things.
For full disclosure, on this older home laptop I run Arch Linux and not
Kubuntu 16.04 like at work. The VTK I build using a custom Arch Linux
package which does

for lib in EXPAT FREETYPE JPEG PNG TIFF ZLIB LIBXML2 OGGTHEORA TWISTED
ZOPE SIX AUTOBAHN MPI4PY JSONCPP GLEW GL2PS; do
cmake_system_flags+="-DVTK_USE_SYSTEM_${lib}:BOOL=ON "
done

...

cmake \
-Wno-dev \
-DCMAKE_SKIP_RPATH=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
-DBUILD_DOCUMENTATION:BOOL=ON \
-DDOCUMENTATION_HTML_HELP:BOOL=ON \
-DDOCUMENTATION_HTML_TARZ:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DVTK_USE_FFMPEG_ENCODER:BOOL=ON \
-DVTK_BUILD_ALL_MODULES:BOOL=ON \
-DVTK_USE_LARGE_DATA:BOOL=ON \
-DVTK_QT_VERSION:STRING="5" \
-DVTK_WRAP_JAVA:BOOL=ON \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_WRAP_TCL:BOOL=ON \
-DCMAKE_CXX_FLAGS="-D__STDC_CONSTANT_MACROS" \
-DVTK_CUSTOM_LIBRARY_SUFFIX="" \
-DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \
-DVTK_INSTALL_TCL_DIR=/usr/lib/tcl${_tkver}/vtk/ \
-DVTK_PYTHON_VERSION=3 \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DPYTHON_INCLUDE_DIR=/usr/include/python3.5m \
-DPYTHON_LIBRARY=/usr/lib/libpython3.5m.so \
-DVTK_USE_SYSTEM_HDF5=OFF \
${cmake_system_flags} \
-DCMAKE_BUILD_TYPE=Release \
"${srcdir}/VTK-$pkgver" \
-GNinja

ninja

to build VTK. I don't have the build log for it, but I would think the
above would give me the OpenGL2 backend (?), since I didn't specify
anything special in the cmake command.

Elvis
Post by Elvis Stansvik
Elvis
Post by Elvis Stansvik
Elvis
Post by Elvis Stansvik
Any advice is much appreciated!
I'm considering switching to the old OpenGL1 backend anyway, since I
realized my laptop at home only has a Sandybridge chipset (at work it's
Haswell), and it's convenient to be able to do some work from my home
laptop. But I'd like to know why I get the above error on my work laptop,
since I thought it'd be compatible.
Elvis
Post by Elvis Stansvik
Great, thanks!
Elvis
Post by Ken Martin
On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik <
Post by Elvis Stansvik
Hi all,
I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial).
The machine where I need this to run has a Haswell Intel graphics
chip (Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile.
Will the new OpenGL backend (the version in 7.0.0) support this graphics
card, or will I need to use the old backend with
-DVTK_RENDERING_BACKEND=OpenGL?
I read that support for is for Ivy Bridge and later in 7.0.0, so I
think I should be OK right?
Thanks in advance,
Elvis
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
http://public.kitware.com/mailman/listinfo/vtkusers
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains confidential
and legally privileged information, and it is intended only for the use of
the addressee. Access to this email by anyone else is unauthorized. If you
are not the intended recipient, any disclosure, copying, distribution or
any action taken in reliance on it is prohibited and may be unlawful. If
you received this communication in error please notify us immediately and
destroy the original message. Thank you.
Ken Martin
2016-06-28 14:24:15 UTC
Permalink
Yes, the 7.0 default is opengl2. - Ken

On Sun, Jun 26, 2016 at 5:45 AM, Elvis Stansvik <
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Ken Martin
Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken
Hm, initially it seemed like things were working fine. I was using the
GPU based volume mapper without problems (using a modified
QVTKRenderWindowInteractor), and I _think_ I was using the OpenGL2 backend
(how can I tell btw?).
But now, as I started trying to make a QOpenGLWidget-based Qt<->VTK
adapter class instead, I get the following when trying to initialize the
ERROR: In
/home/estan/Blandat/vtk-python3/src/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx,
line 545
vtkGenericOpenGLRenderWindow (0x205fb10): GL version 2.1 with the
gpu_shader4 extension is not supported by your graphics driver but is
required for the new OpenGL rendering backend. Please update your OpenGL
driver. If you are using Mesa please make sure you have version 10.6.5 or
later and make sure your driver in Mesa supports OpenGL 3.2.
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
I'm a little unsure about which of these version numbers I should be
looking at to see if my graphics has what it takes.
Also, I'm now even unsure if I was ever using the OpenGL2 backend..
perhaps VTK was falling back to OpenGL1 somehow, and that's why it worked
in the beginning? Or is the selection of backend always a compile time
thing?
https://launchpad.net/~elvstone/+archive/ubuntu/vtk7
https://launchpadlibrarian.net/261625779/buildlog_ubuntu-xenial-amd64.vtk7_7.0.0-0ubuntu2_BUILDING.txt.gz
-- Setting rendering backend to 'OpenGL2' as none was specified.
-- Backend OpenGL modules: vtkRenderingContextOpenGL;vtkRenderingOpenGL;vtkRenderingLIC;vtkRenderingVolumeOpenGL;vtkRenderingGL2PS
-- Backend OpenGL2 modules: vtkRenderingContextOpenGL2;vtkRenderingVolumeOpenGL2;vtkRenderingOpenGL2;vtkRenderingLICOpenGL2;vtkDomainsChemistryOpenGL2
-- Enabling modules for OpenGL2.
Does this mean I'll always be using the OpenGL2 backend, or that OpenGL
vs OpenGL2 is a runtime choice?
I've now done some testing here at home, on my old Sandybridge laptop
OpenGL version string: 3.0 Mesa 11.2.2
Vendor: Intel Open Source Technology Center (0x8086)
Device: Mesa DRI Intel(R) Sandybridge Mobile (0x126)
Version: 11.2.2
Accelerated: yes
Video memory: 1536MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
And it turns out that all I had to do in my little QOpenGLWidget-adapter
surfaceFormat.setMajorVersion(3)
surfaceFormat.setMinorVersion(2)
surfaceFormat.setProfile(QSurfaceFormat.CompatibilityProfile)
self.setFormat(surfaceFormat)
to request OpenGL 3.2 compatibility profile. After this I no longer get
the error and rendering seems to work.
I'm actually a little surprised this works, since I didn't think my old
home laptop would support the OpenGL2 backend. And the glxinfo output shows
"Max compat profile version: 3.0". But printing the
.format().majorVersion() and .format().minorVersion() after setting it on
the QOpenGLWidget confirms that I've gotten the 3.2 format set.
Oh well, I'm happy now, but would still like some clarification from
someone who knows more than me about these things.
For full disclosure, on this older home laptop I run Arch Linux and not
Kubuntu 16.04 like at work. The VTK I build using a custom Arch Linux
package which does
for lib in EXPAT FREETYPE JPEG PNG TIFF ZLIB LIBXML2 OGGTHEORA TWISTED
ZOPE SIX AUTOBAHN MPI4PY JSONCPP GLEW GL2PS; do
cmake_system_flags+="-DVTK_USE_SYSTEM_${lib}:BOOL=ON "
done
...
cmake \
-Wno-dev \
-DCMAKE_SKIP_RPATH=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
-DBUILD_DOCUMENTATION:BOOL=ON \
-DDOCUMENTATION_HTML_HELP:BOOL=ON \
-DDOCUMENTATION_HTML_TARZ:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DVTK_USE_FFMPEG_ENCODER:BOOL=ON \
-DVTK_BUILD_ALL_MODULES:BOOL=ON \
-DVTK_USE_LARGE_DATA:BOOL=ON \
-DVTK_QT_VERSION:STRING="5" \
-DVTK_WRAP_JAVA:BOOL=ON \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_WRAP_TCL:BOOL=ON \
-DCMAKE_CXX_FLAGS="-D__STDC_CONSTANT_MACROS" \
-DVTK_CUSTOM_LIBRARY_SUFFIX="" \
-DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \
-DVTK_INSTALL_TCL_DIR=/usr/lib/tcl${_tkver}/vtk/ \
-DVTK_PYTHON_VERSION=3 \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DPYTHON_INCLUDE_DIR=/usr/include/python3.5m \
-DPYTHON_LIBRARY=/usr/lib/libpython3.5m.so \
-DVTK_USE_SYSTEM_HDF5=OFF \
${cmake_system_flags} \
-DCMAKE_BUILD_TYPE=Release \
"${srcdir}/VTK-$pkgver" \
-GNinja
ninja
to build VTK. I don't have the build log for it, but I would think the
above would give me the OpenGL2 backend (?), since I didn't specify
anything special in the cmake command.
Elvis
Post by Elvis Stansvik
Elvis
Post by Elvis Stansvik
Elvis
Post by Elvis Stansvik
Any advice is much appreciated!
I'm considering switching to the old OpenGL1 backend anyway, since I
realized my laptop at home only has a Sandybridge chipset (at work it's
Haswell), and it's convenient to be able to do some work from my home
laptop. But I'd like to know why I get the above error on my work laptop,
since I thought it'd be compatible.
Elvis
Post by Elvis Stansvik
Great, thanks!
Elvis
Post by Ken Martin
On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik <
Post by Elvis Stansvik
Hi all,
I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial).
The machine where I need this to run has a Haswell Intel graphics
chip (Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile.
Will the new OpenGL backend (the version in 7.0.0) support this graphics
card, or will I need to use the old backend with
-DVTK_RENDERING_BACKEND=OpenGL?
I read that support for is for Ivy Bridge and later in 7.0.0, so I
think I should be OK right?
Thanks in advance,
Elvis
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
http://public.kitware.com/mailman/listinfo/vtkusers
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains confidential
and legally privileged information, and it is intended only for the use of
the addressee. Access to this email by anyone else is unauthorized. If you
are not the intended recipient, any disclosure, copying, distribution or
any action taken in reliance on it is prohibited and may be unlawful. If
you received this communication in error please notify us immediately and
destroy the original message. Thank you.
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.
Elvis Stansvik
2016-06-28 16:11:25 UTC
Permalink
Post by Ken Martin
Yes, the 7.0 default is opengl2. - Ken
Alright, thanks for the info Ken.

I've since ran into some problems with segfaults inside VTK when trying to
do volume rendering into my QOpenGLWidget-based VTK widget (as well as that
from another author), both on my home Sandybridge laptop and Haswell laptop
at work. So for now I've given up on using QOpenGLWidget and will stay with
QGLWidget, despite the inability to turn on multisampling, but if anyone
has time to look at my recent thread about this ("Segfault in
vtkOpenGLRenderWindow.OpenGLInitState and advice about render window in/out
events"), it would be much appreciated.

Elvis
Post by Ken Martin
On Sun, Jun 26, 2016 at 5:45 AM, Elvis Stansvik <
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
2016-05-25 17:08 GMT+02:00 Elvis Stansvik <
Post by Elvis Stansvik
Post by Ken Martin
Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken
Hm, initially it seemed like things were working fine. I was using
the GPU based volume mapper without problems (using a modified
QVTKRenderWindowInteractor), and I _think_ I was using the OpenGL2 backend
(how can I tell btw?).
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
But now, as I started trying to make a QOpenGLWidget-based Qt<->VTK
adapter class instead, I get the following when trying to initialize the
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
ERROR: In
/home/estan/Blandat/vtk-python3/src/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx,
line 545
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
vtkGenericOpenGLRenderWindow (0x205fb10): GL version 2.1 with the
gpu_shader4 extension is not supported by your graphics driver but is
required for the new OpenGL rendering backend. Please update your OpenGL
driver. If you are using Mesa please make sure you have version 10.6.5 or
later and make sure your driver in Mesa supports OpenGL 3.2.
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
I'm a little unsure about which of these version numbers I should be
looking at to see if my graphics has what it takes.
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Also, I'm now even unsure if I was ever using the OpenGL2 backend..
perhaps VTK was falling back to OpenGL1 somehow, and that's why it worked
in the beginning? Or is the selection of backend always a compile time
thing?
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
https://launchpad.net/~elvstone/+archive/ubuntu/vtk7
https://launchpadlibrarian.net/261625779/buildlog_ubuntu-xenial-amd64.vtk7_7.0.0-0ubuntu2_BUILDING.txt.gz
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
-- Setting rendering backend to 'OpenGL2' as none was specified.
vtkRenderingContextOpenGL;vtkRenderingOpenGL;vtkRenderingLIC;vtkRenderingVolumeOpenGL;vtkRenderingGL2PS
vtkRenderingContextOpenGL2;vtkRenderingVolumeOpenGL2;vtkRenderingOpenGL2;vtkRenderingLICOpenGL2;vtkDomainsChemistryOpenGL2
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
-- Enabling modules for OpenGL2.
Does this mean I'll always be using the OpenGL2 backend, or that
OpenGL vs OpenGL2 is a runtime choice?
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
I've now done some testing here at home, on my old Sandybridge laptop
OpenGL version string: 3.0 Mesa 11.2.2
Vendor: Intel Open Source Technology Center (0x8086)
Device: Mesa DRI Intel(R) Sandybridge Mobile (0x126)
Version: 11.2.2
Accelerated: yes
Video memory: 1536MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
And it turns out that all I had to do in my little
surfaceFormat.setMajorVersion(3)
surfaceFormat.setMinorVersion(2)
surfaceFormat.setProfile(QSurfaceFormat.CompatibilityProfile)
self.setFormat(surfaceFormat)
to request OpenGL 3.2 compatibility profile. After this I no longer get
the error and rendering seems to work.
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
I'm actually a little surprised this works, since I didn't think my old
home laptop would support the OpenGL2 backend. And the glxinfo output shows
"Max compat profile version: 3.0". But printing the
.format().majorVersion() and .format().minorVersion() after setting it on
the QOpenGLWidget confirms that I've gotten the 3.2 format set.
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Oh well, I'm happy now, but would still like some clarification from
someone who knows more than me about these things.
Post by Ken Martin
Post by Elvis Stansvik
For full disclosure, on this older home laptop I run Arch Linux and not
Kubuntu 16.04 like at work. The VTK I build using a custom Arch Linux
package which does
Post by Ken Martin
Post by Elvis Stansvik
for lib in EXPAT FREETYPE JPEG PNG TIFF ZLIB LIBXML2 OGGTHEORA TWISTED
ZOPE SIX AUTOBAHN MPI4PY JSONCPP GLEW GL2PS; do
Post by Ken Martin
Post by Elvis Stansvik
cmake_system_flags+="-DVTK_USE_SYSTEM_${lib}:BOOL=ON "
done
...
cmake \
-Wno-dev \
-DCMAKE_SKIP_RPATH=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
-DBUILD_DOCUMENTATION:BOOL=ON \
-DDOCUMENTATION_HTML_HELP:BOOL=ON \
-DDOCUMENTATION_HTML_TARZ:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DVTK_USE_FFMPEG_ENCODER:BOOL=ON \
-DVTK_BUILD_ALL_MODULES:BOOL=ON \
-DVTK_USE_LARGE_DATA:BOOL=ON \
-DVTK_QT_VERSION:STRING="5" \
-DVTK_WRAP_JAVA:BOOL=ON \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_WRAP_TCL:BOOL=ON \
-DCMAKE_CXX_FLAGS="-D__STDC_CONSTANT_MACROS" \
-DVTK_CUSTOM_LIBRARY_SUFFIX="" \
-DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \
-DVTK_INSTALL_TCL_DIR=/usr/lib/tcl${_tkver}/vtk/ \
-DVTK_PYTHON_VERSION=3 \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DPYTHON_INCLUDE_DIR=/usr/include/python3.5m \
-DPYTHON_LIBRARY=/usr/lib/libpython3.5m.so \
-DVTK_USE_SYSTEM_HDF5=OFF \
${cmake_system_flags} \
-DCMAKE_BUILD_TYPE=Release \
"${srcdir}/VTK-$pkgver" \
-GNinja
ninja
to build VTK. I don't have the build log for it, but I would think the
above would give me the OpenGL2 backend (?), since I didn't specify
anything special in the cmake command.
Post by Ken Martin
Post by Elvis Stansvik
Elvis
Post by Elvis Stansvik
Elvis
Post by Elvis Stansvik
Elvis
Any advice is much appreciated!
I'm considering switching to the old OpenGL1 backend anyway, since I
realized my laptop at home only has a Sandybridge chipset (at work it's
Haswell), and it's convenient to be able to do some work from my home
laptop. But I'd like to know why I get the above error on my work laptop,
since I thought it'd be compatible.
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Elvis
Post by Elvis Stansvik
Great, thanks!
Elvis
Post by Ken Martin
On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik <
Post by Elvis Stansvik
Hi all,
I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial).
The machine where I need this to run has a Haswell Intel graphics
chip (Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile.
Will the new OpenGL backend (the version in 7.0.0) support this graphics
card, or will I need to use the old backend with
-DVTK_RENDERING_BACKEND=OpenGL?
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Ken Martin
Post by Elvis Stansvik
I read that support for is for Ivy Bridge and later in 7.0.0, so I
think I should be OK right?
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Ken Martin
Post by Elvis Stansvik
Thanks in advance,
Elvis
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Post by Ken Martin
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Elvis Stansvik
Post by Ken Martin
Post by Elvis Stansvik
Search the list archives at: http://markmail.org/search/?q=vtkusers
http://public.kitware.com/mailman/listinfo/vtkusers
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains
confidential and legally privileged information, and it is intended only
for the use of the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken in reliance on it is prohibited
and may be unlawful. If you received this communication in error please
notify us immediately and destroy the original message. Thank you.
Post by Ken Martin
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.

Loading...