[Insight-users] SNAP: Mac OS X and : GL/glu.h ==> OpenGL/glu.h
problem.
Luis Ibanez
luis.ibanez at kitware.com
Wed Dec 27 07:55:17 EST 2006
Hi Vincent, Brock,
Thanks for the comments.
It turned out that most of the files listed in my previous
email already have the conditional code for the Mac.
SNAP has a helper file SNAPOpenGL.h that factorizes the
inclusion of OpenGL headers. However, not all SNAP files
were using it.
Changes were needed in
SNAP/UserInterface/SliceWindow/OpenGLSliceTexture.h
SNAP/UserInterface/Window3D/Window3D.cxx
Brock:
This changes have been committed to the CVS HEAD.
If you have a chance, could you please give it a
try and let us know if you find any problem ?
Thanks
Luis
---------------------------
Vincent A. Magnotta wrote:
> Luis,
>
> You actually want to do something like the following to correct the GL
> issues under Mac OS X.
>
> #ifdef __APPLE__
> #include <OpenGL/glu.h>
> #else
> #include <GL/glu.h>
> #endif
>
>
> Vince
>
>
> On Wed, 2006-12-20 at 09:14 -0500, Luis Ibanez wrote:
>
>>Hi Brock,
>>
>>Thanks for reporting this problem.
>>
>>We entered this issue as Bug # 4235
>>http://public.kitware.com/Bug/bug.php?op=show&bugid=4235&pos=0
>>
>>
>>I'm trying to figure out what lines must be changed.
>>
>>When grepping for "glu" in SNAP, here is what I get:
>>
>>$ grep -r glu * | grep include
>>Common/SNAPOpenGL.h: #include <GL/glu.h>
>>Common/SNAPOpenGL.h: #include <GL/glu.h>
>>UserInterface/SliceWindow/OpenGLSliceTexture.h:#include <GL/glu.h>
>>UserInterface/Window3D/Window3D.cxx:#include <FL/glut.H>
>>
>>
>>The use of "GL" versus "OpenGL" seems to be inconsistent
>>in other places of the toolkit.
>>
>>Here is what I get when grepping from the top directory of
>>InsightApplications:
>>
>>ibanez at DARWINIA ~/src/InsightApplications
>>$ grep -r glu * | grep include
>>Auxiliary/FltkImageViewer/fltkClippingPlane3DDrawer.cxx:#include
>><OpenGL/glu.h>
>>Auxiliary/FltkImageViewer/fltkClippingPlane3DDrawer.cxx:#include <GL/glu.h>
>>Auxiliary/FltkImageViewer/fltkGlWindowInteractive.cxx:#include
>><OpenGL/glu.h>
>>Auxiliary/FltkImageViewer/fltkGlWindowInteractive.cxx:#include <GL/glu.h>
>>Auxiliary/FltkImageViewer/fltkImage2DViewerWindow.cxx:#include
>><OpenGL/glu.h>
>>Auxiliary/FltkImageViewer/fltkImage2DViewerWindow.cxx:#include <GL/glu.h>
>>Auxiliary/FltkImageViewer/fltkRGBImage2DViewerWindow.cxx:#include
>><OpenGL/glu.h>
>>Auxiliary/FltkImageViewer/fltkRGBImage2DViewerWindow.cxx:#include <GL/glu.h>
>>Auxiliary/FltkImageViewer/fltkSlice2DDrawer.txx:#include <OpenGL/glu.h>
>>Auxiliary/FltkImageViewer/fltkSlice2DDrawer.txx:#include <GL/glu.h>
>>Auxiliary/FltkImageViewer/fltkSlice3DDrawer.txx:#include <OpenGL/glu.h>
>>Auxiliary/FltkImageViewer/fltkSlice3DDrawer.txx:#include <GL/glu.h>
>>Auxiliary/FltkImageViewer/fltkSphere3D.h:#include <OpenGL/glu.h>
>>Auxiliary/FltkImageViewer/fltkSphere3D.h:#include <GL/glu.h>
>>DeformableRegistration3DTimeSeries/TransferFunctionEditor.h:#include
>><GL/glu.h>
>>GPDM3DTest/My3DView.h:# include <GL/glu.h>
>>SNAP/Common/SNAPOpenGL.h: #include <GL/glu.h>
>>SNAP/Common/SNAPOpenGL.h: #include <GL/glu.h>
>>SNAP/UserInterface/SliceWindow/OpenGLSliceTexture.h:#include <GL/glu.h>
>>SNAP/UserInterface/Window3D/Window3D.cxx:#include <FL/glut.H>
>>
>>
>>It seems that we should replace all occurrences of
>>
>> "GL/glu.h"
>>
>>with
>>
>> "OpenGL/glu.h"
>>
>>
>>Is that what you suggest as the fix ?
>>
>>
>> Please let us know,
>>
>>
>>
>> Thanks
>>
>>
>> Luis
>>
>>
>>--------------------------------
>>Brock Tice wrote:
>>
>>>Hi Luis,
>>> I was trying to build InsightApplications today, and before the
>>>problem referenced in the subject (which I fixed via your suggestions on
>>>the mailing list), I ran into the problem that a few of the header files
>>>in SNAP don't use OpenGL/glu.h on OS X, but rather use GL/glu.h. I
>>>switched them to OpenGL/glu.h to make it work. This can of course be
>>>done at compile time by checking for __APPLE__ as is done in *some* of
>>>the .h files. I checked out the bug tracking on the ITK site and
>>>couldn't find a simple way to submit this, so since I saw your email on
>>>a closely related issue, I thought I'd contact you.
>>>
>>>Thanks,
>>> --Brock
>>>--~--~--~--~--~--~--~--~--~--~--~--~
>>>Brock M. Tice
>>>
>>>blog - http://virtuallyshocking.com
>>>contact info - http://brocktice.com
>>>--~--~--~--~--~--~--~--~--~--~--~--~
>>>
>>>I believe that it is better to tell the truth than to lie.
>>>I believe that it is better to be free than to be a slave.
>>>And I believe that it is better to know than to be ignorant.
>>>(H. L. Mencken)
>>>
>>>
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
More information about the Insight-users
mailing list