<x-html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Sorry Lisa,
<p>but I didn't get any reply on this topic and I didn't found my post
in the mailing list archive:-(
<br>
<blockquote TYPE=CITE>
<pre>
Hello Will,
I found some compiling problems with your 'latest' VTK
(<A HREF="ftp://128.113.5.234/pub/vtk_nightly/">ftp://128.113.5.234/pub/vtk_nightly/</A>). I downloaded it on Sunday, 26.09.1999.
-rw-r--r-- 1 nuetzel users 3395421 Sep 26 16:44 vtk.tar.gz
The problem seems to be gcc-2.95.1 (the 'new' official gcc release) or Mesa (3.1
beta3/CVS) related.
But I think your coding brakes the ANSI C/C++ rules and the 'new' stricter gcc do not
ignore it any longer.
c++ -O -pipe -fomit-frame-pointer -funroll-loops -fPIC -DVTK_USE_PTHREADS
-D_HP_NO_FAST_MACROS -DHAVE_LIMITS_H -DHAVE_UNISTD_H -I. -I. -I./../graphics
-DVTK_USE_GRAPHICS -I./../imaging -DVTK_USE_IMAGING -I./../patented -DVTK_USE_PATENTED
-I./../contrib -DVTK_USE_CONTRIB -DVTK_USE_OGLR -I/usr/X11R6/include -I./../common
-c vtkOpenGLTexture.cxx -o vtkOpenGLTexture.o
vtkOpenGLTexture.cxx: In method `unsigned char *
vtkOpenGLTexture::ResampleToPowerOfTwo(int &, int &, unsigned char *, int)':
vtkOpenGLTexture.cxx:378: warning: assignment to `unsigned char' from `float'
c++ -O -pipe -fomit-frame-pointer -funroll-loops -fPIC -DVTK_USE_PTHREADS
-D_HP_NO_FAST_MACROS -DHAVE_LIMITS_H -DHAVE_UNISTD_H -I. -I. -I./../graphics
-DVTK_USE_GRAPHICS -I./../imaging -DVTK_USE_IMAGING -I./../patented -DVTK_USE_PATENTED
-I./../contrib -DVTK_USE_CONTRIB -DVTK_USE_OGLR -I/usr/X11R6/include -I./../common
-c vtkOpenGLVolumeTextureMapper2D.cxx -o
vtkOpenGLVolumeTextureMapper2D.ovtkOpenGLVolumeTextureMapper2D.cxx: In method `void
vtkOpenGLVolumeTextureMapper2D::Render(vtkRenderer *, vtkVolume *)':
vtkOpenGLVolumeTextureMapper2D.cxx:108: conversion from `int' to `enum GLenum'
vtkOpenGLVolumeTextureMapper2D.cxx:118: conversion from `int' to `enum GLenum'
vtkOpenGLVolumeTextureMapper2D.cxx:140: conversion from `int' to `enum GLenum'
make[1]: *** [vtkOpenGLVolumeTextureMapper2D.o] Error 1
make[1]: Leaving directory `/usr/local/vtk/vtk/graphics'
make: *** [build_graphics] Error 2
958.520u 33.040s 16:35.07 99.6% 0+0k 0+0io 501321pf+0w
Here comes the (broken) code:
[snip]
// Use the OpenGL clip planes
clipPlanes = this->ClippingPlanes;
if ( clipPlanes )
{
numClipPlanes = clipPlanes->GetNumberOfItems();
if (numClipPlanes > 6)
{
vtkErrorMacro(<< "OpenGL guarantees only 6 additional clipping planes");
}
for (i = 0; i < numClipPlanes; i++)
{
! glEnable(GL_CLIP_PLANE0+i);
plane = (vtkPlane *)clipPlanes->GetItemAsObject(i);
planeEquation[0] = plane->GetNormal()[0];
planeEquation[1] = plane->GetNormal()[1];
planeEquation[2] = plane->GetNormal()[2];
planeEquation[3] = -(planeEquation[0]*plane->GetOrigin()[0]+
planeEquation[1]*plane->GetOrigin()[1]+
planeEquation[2]*plane->GetOrigin()[2]);
! glClipPlane(GL_CLIP_PLANE0+i,planeEquation);
}
}
this->GenerateTexturesAndRenderRectangles();
glDisable( GL_BLEND );
glDisable( GL_TEXTURE_2D );
// Turn lighting back on
glEnable( GL_LIGHTING );
// pop transformation matrix
glMatrixMode( GL_MODELVIEW );
glPopMatrix();
matrix->Delete();
if ( clipPlanes )
{
for (i = 0; i < numClipPlanes; i++)
{
! glDisable(GL_CLIP_PLANE0+i);
}
}
Have you (all) any idea to fix this???
No, an older compiler should not be the solution! :-)
Maybe some string manipulation (I know, this is a stupid idea...)
Will, please upgrade your Linux test environment to at least RedHat 6.0 (maybe
S.u.S.E. 6.2, the newest distribution you can get these days; Caldera x.x; Debian x.x;
etc.). With that you get real multitasking/multithreading (glibc-2.1.x), the new
gcc-2.95.1, Mesa-3.0 (3.1 beta2), etc...
Thanks for your great visualization tool, Will!!!
Dieter
BTW For the Mesa guys, look at this location: <A HREF="http://www.kitware.com/vtk.html">http://www.kitware.com/vtk.html</A>
---
Dieter Nützel
Graduate Student, Computer Science
University of Hamburg
Department of Computer Science
Cognitive Systems Group
Vogt-Kölln-Straße 30
D-22527 Hamburg, Germany
email: Dieter Nützel <nuetzel@kogs.informatik.uni-hamburg.de>
@home: Dieter Nützel <dieter.nuetzel@arcormail.de>
_________________________________________________________
DRI (Direct Rendering Infrastructure) for Linux.
Because I do 3D medical visualization as my thesis.
_________________________________________________________
</pre>
</blockquote>
</html>
</x-html>