[Insight-users] SNAP: Mac OS X and : GL/glu.h ==> OpenGL/glu.h problem.

Vincent A. Magnotta vincent-magnotta at uiowa.edu
Wed Dec 20 09:42:52 EST 2006


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
> 
-- 
Assistant Professor
Department of Radiology
0453-D JCP
200 Hawkins Drive
Iowa City, IA 52242
E-mail: vincent-magnotta at uiowa.edu
Phone: 319-356-8255
Fax: 319-353-6275
Website: http://www.radiology.uiowa.edu



More information about the Insight-users mailing list