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

Mike Jackson mike.jackson at imts.us
Wed Dec 20 09:37:00 EST 2006


VTK uses the following in their toolkit:

VTK/Rendering/vtkOPenGL.h

#ifndef __vtkOpenGL_h
#define __vtkOpenGL_h

#include "vtkConfigure.h"

#if defined(__APPLE__) && (defined(VTK_USE_CARBON) || defined 
(VTK_USE_COCOA))
# include <OpenGL/gl.h> // Include OpenGL API.
#else
# include "vtkWindows.h" // Needed to include OpenGL header on Windows.
# include <GL/gl.h> // Include OpenGL API.
#endif

#endif

and the opengl seems to work fine in there. Maybe SNAP should do  
something similar.

-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


On Dec 20, 2006, at 9:14 AM, 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