[vtkusers] VTK 5.1 Mesa+Offscreen compilation problem
Rasmus Hemph
rasmus.hemph at chalmers.se
Thu Nov 23 11:39:13 EST 2006
Hi Obada,
I have had some problems with my mailingprogram. Hopefully this will get
back to the list. I tried your new patch with full satisfaction. The
test program as well as "real-life" data has rendered off screen without
troubles. Thank you very much. Nice work!
I did have a bit of trouble applying the patch however, so resorted to
copying the files to the correct places. Diff was giving an error
message for one of the files. One possibility is that this file might
already have been messed up before applying the patch.
Best regards
Rasmus Hemph
Hi Rasmus,
I am sending my reply back to the list, just so that others can
confirm, correct or complain about my suggestions ;-)
On 11/22/06, Rasmus Hemph <rasmus.hemph at chalmers.se> wrote:
> Thank you very much for your response. Got it to compile with your
> hints, but unfortunately my code gives segfault when I try to use off
> screen rendering.
I apologize for the inaccurate information I gave in my previous
message. I have to admit that I had postponed the actual testing of
offscreen rendering, I just supposed it would work. Well, I was
wrong--my mistake, sorry if it caused any confusion.
Thank you for sending an example program for testing
("OffScreenCone.py", attached again as reference for others); I
received a segmentation fault, too, which luckily turned out to have a
predictable cause. I have now created a new patch from scratch, which
lets me compile VTK and run OffScreenCone.py successfully
("vtk-mesa-fix.diff", attached; see [1] below for some of my CMake
build settings).
> I am a bit confused as to what changes need to be done
> in vtkMesaRenderWindow.h. If it is not too much trouble, would you mind
> sending it over? I am attaching the simple offscreenCone.py testcase
> which causes a crash on my system.
It turns out that some more small fixes are required to make the Mesa
code work again. I am not sure at all whether the patch is correct;
IMHO the whole "#define" business used for sharing code between OpenGL
and Mesa .cxx implementations, yet maintaining separate header files,
makes things a bit difficult to keep track of. Even with the
"OffScreenCone.py" example working, there might be some other spots
that need attention.
There does not seem to be a related bug report yet, so I am probably
going to open one later and/or ask in the vtk-developers list for
help.
Could you try again with the new patch? You can apply it like
$ cat vtk-mesa-fix.diff | patch -p0
from the VTK source root. Just for convenience, I have attached an
additional tarball that contains entire files affected by the patch
("vtk-mesa-fix.tar.gz"). Let me know if you encounter any problems.
Regards
Obada
----
[1] For reference, here are some values from my "CMakeCache.txt" used
in building VTK:
BUILD_SHARED_LIBS:BOOL=ON
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-4.1.1
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g
CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-4.1.1
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g
VTK_USE_MANGLED_MESA:BOOL=ON
VTK_USE_OFFSCREEN:BOOL=ON
VTK_USE_RENDERING:BOOL=ON
VTK_WRAP_PYTHON:BOOL=ON
More information about the vtkusers
mailing list