[vtkusers] VTK 5.1 Mesa+Offscreen compilation problem
Obada Mahdi
omahdi at gmx.de
Wed Nov 22 22:29:48 EST 2006
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk-mesa-fix.diff
Type: application/octet-stream
Size: 16763 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061123/e6d41fb6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk-mesa-fix.tar.gz
Type: application/x-gzip
Size: 11196 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061123/e6d41fb6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OffScreenCone.py
Type: application/octet-stream
Size: 1453 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061123/e6d41fb6/attachment-0001.obj>
More information about the vtkusers
mailing list